Warn on declarations not at beginning of the block.

They are accepted by gcc but not by MS compilers.
This commit is contained in:
Daniele Varrazzo 2010-05-19 11:36:39 +01:00
parent b597ccf917
commit eacf6febfe

View File

@ -198,6 +198,12 @@ class psycopg_build_ext(build_ext):
self.libraries.append('ssl')
self.libraries.append('crypto')
def finalize_linux2(self):
"""Finalize build system configuration on GNU/Linux platform."""
# tell piro that GCC is fine and dandy, but not so MS compilers
for ext in self.extensions:
ext.extra_compile_args.append('-Wdeclaration-after-statement')
def finalize_options(self):
"""Complete the build system configuation."""
build_ext.finalize_options(self)