Author ronaldoussoren
Recipients Arfrever, benjamin.peterson, christian.heimes, eric.araujo, jkloth, ronaldoussoren, tarek
Date 2013-06-18.12:47:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2013-06-18 12:47:39ronaldoussorensetrecipients: + ronaldoussoren, christian.heimes, benjamin.peterson, tarek, jkloth, eric.araujo, Arfrever
2013-06-18 12:47:39ronaldoussorensetmessageid: <>
2013-06-18 12:47:39ronaldoussorenlinkissue18211 messages
2013-06-18 12:47:38ronaldoussorencreate