Ronald Oussoren added the comment:
Closing this one because Issue21121 contains a usable patch.
--
resolution: - duplicate
superseder: - -Werror=declaration-after-statement is added even for extension
modules through setup.py
___
Python tracker
Ronald Oussoren added the comment:
Sigh. Actually closing doesn't work due to the dependency :-(
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
___
Changes by Éric Araujo mer...@netwok.org:
--
dependencies: -CPython setup.py problems
stage: needs patch - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
Ronald Oussoren added the comment:
I also don't understand why the optimization level shouldn't be used when
building 3th-party extensions.
Removing the -O flag for build_ext would be a regression compared to the
current behavior because 3th-party extensions would suddenly be compiled with
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
___
___
Python-bugs-list
STINNER Victor added the comment:
By the way, I don't think that Python should pass the optimization level (-O0
or -O3) to extensions, except for builtin extensions (of the stdlib).
--
___
Python tracker rep...@bugs.python.org
Benjamin Peterson added the comment:
Why not?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
___
___
Python-bugs-list mailing list
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
Ronald Oussoren added the comment:
I had a patch that only changed distutils.sysconfig.get_config_var('CFLAGS')
when not building python, but then noticed that this doesn't work: the setup.py
file for stdlib extensions fetches information from the toplevel sysconfig
file, not
Ronald Oussoren added the comment:
The setup.py issues are in #18255.
--
dependencies: +CPython setup.py problems
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
___
Ronald Oussoren added the comment:
I just noticed the patch is not good enough: python-config --cflags still
prints the -Werror flag because it is now a shell script and doesn't use
sysconfig data at all.
--
___
Python tracker
Benjamin Peterson added the comment:
Yes, we definitely need some way for CPython compiler flags to not infect
everything built with distutils.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
___
New submission from Ronald Oussoren:
Changeset a3559c8c614b added -Werror=statement-after-declaration to the CFLAGS
for compiler that support it.
This new flags is fine for CPython itself (which is explicitly writting in C89
style to support older compilers and Microsoft Visual Studio), but
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
___
___
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:
--
nosy: +jkloth
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18211
___
___
16 matches
Mail list logo