Ronald Oussoren added the comment:

Is "-Werror=statement-after-declaration" the right solution anyway? This errors 
out on just one of the incompatibilities between C89 and C99, although it is 
one that is easy to get wrong accidentally.

Gcc (and clang) also support '-std=c89' that forces the compiler to support 
only that standard. Not that switching to that flag would get us closer to 
closing this issue :-)

BTW. To make things more fun: both sysconfig and distutils.sysconfig contain 
code to parse the Makefile, and those two sets of code are not equivalent 
(distutils.sysconfig lets you override values using the environment, sysconfig 
does not). 

The attached crude hack fixes this particular issue, but I'm far from convinced 
that is is the right solution for two reasons: first of all it is a hack, 
second of all it drops the -Werror flag when building CPython's extensions.

A better solution would be the introduction of a new variable in the Makefile 
that contains those CFLAGS that should only be used during the build of Python 
itself, all those flags can then be ignored by the Makefile parsers in 
distutils.sysconfig and sysconfig. The disadvantage is that is introduces even 
more complexity in the Makefile.

----------
Added file: http://bugs.python.org/file30638/issue18211-hack.txt

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18211>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to