[Python-bugs-list] [ python-Bugs-458878 ] strict-protypes and signalmodule.c

noreply@sourceforge.net noreply@sourceforge.net
Fri, 07 Sep 2001 05:47:46 -0700


Bugs item #458878, was opened at 2001-09-05 13:26
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458878&group_id=5470

Category: Python Interpreter Core
>Group: Platform-specific
Status: Open
>Resolution: Wont Fix
Priority: 2
Submitted By: Jack Jansen (jackjansen)
>Assigned to: Jack Jansen (jackjansen)
Summary: strict-protypes and signalmodule.c

Initial Comment:
Signalmodule.c generates lots of warnings when compiled with gcc -Wstrict-prototypes.

If someone wants to pick this up: fine, otherwise I'll do it myself, but it will be a while until I
find the time.


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-07 05:47

Message:
Logged In: YES 
user_id=6380

Jack, am I right that you didn't even LOOK at the lines
indicated by those errors? :-)

The compiler flagged all occurrences of SIG_IGN, SIG_DFL,
and SIG_ERR.

Those are macros that come from <signal.h>, that contain a
cast to a function type. Apparently that function type
doesn't have a prototype.

----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2001-09-07 02:44

Message:
Logged In: YES 
user_id=45365

Sorry, I was being obscure. The problem at hand is that gcc on MacOSX wants all declarations to be prototype-style, so no K7R style even for static routines, if you give -Wall -Wstrict-prototypes. Attached is the compiler output.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-05 13:55

Message:
Logged In: YES 
user_id=6380

Do you mean that it wants a separate declaration, before the
definition?  That's outright silly.  Complain to Apple.
We're not going to fix that. I get zero warnings on Linux,
with the same options.


----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2001-09-05 13:41

Message:
Logged In: YES 
user_id=45365

No, it's not in the header files or anything. Gcc on OSX (at least with -Wall -Wstrict-prototypes) requires
that all routines, *including static ones*, have prototype-style declarations.

I'm not sure how well gcc versions compare between platforms, but mine says it is "2.95.2".

And then I'm not even complaining (yet) about the MetroWerks compiler, which requires that for every
external routine defined there is already a prototyped declaration in scope:-) And according to the letter
of the ANSI standard it is right about requiring this, but every single ...init() routine fails this test.


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-05 13:33

Message:
Logged In: YES 
user_id=6380

Not for me on Linux. It's probably something in your header
files. What platform? IRIX or MacOSX? :-)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458878&group_id=5470