[Python-Dev] New anal crusade

Jack Jansen jack@oratrix.nl
Tue, 22 Aug 2000 11:34:20 +0200


> Has anyone tried compiling Python under gcc with
> 
>     -Wmissing-prototypes -Wstrict-prototypes

I have a similar set of options (actually it's difficult to turn them off if 
you're checking for prototypes:-) which will make the CodeWarrior compiler for 
the Mac be strict about prototypes, which complains about external functions 
being declared without a prototype in scope. I was initially baffled by this: 
why would it want a prototype if the function declaration is ansi-style 
anyway? But, it turns out its a really neat warning: usually if you declare an 
external without a prototype in scope it means that it isn't declared in a .h 
file, which means that either (a) it shouldn't have been an extern in the 
first place or (b) you've duplicated the prototype in an external declaration 
somewhere else which means the prototypes aren't necessarily identical.

For Python this option produces warnings for all the init routines, which is 
to be expected, but also for various other things (I seem to remember there's 
a couple in the GC code). If anyone is interested I can print them out and 
send them here.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm