Perry Smith <pedz@xxxxxxxxxxxxxxxx> writes: > I'm trying to help a guy using Python. From Python on a PPC Mac, he > is trying to call printf > in the standard C shared library with a format string, an int, and > some doubles. I'm thinking > that the calling sequence from python back into the real C code is > not going to call printf > properly because, as I recall, to call printf properly, the compiler > must see the prototype so > it knows to actually push the arguments and not pass them in > registers. That is true in the general case, but for PPC and most other targets, the varargs handling is smart enough to do the right thing when the parameters are passed in registers. So the right thing happens even if no prototype is in scope. > So, somehow, gcc "knows" about printf (I guess that is what the > warning is > telling me). Can I tell gcc to "forget" and go ahead and produce > whatever > code its best guess is. Use -fno-builtin-printf. Ian