Re: RELEASE: psycopg 2.2.1
Daniele Varrazzo <[email protected]> Wed, 19 May 2010 11:58:47 +0100
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, May 18, 2010 at 12:56 AM, Federico Di Gregorio <fog-NGVKUo/i/[email protected]> wrote: > On 18/05/2010 01:36, Daniele Varrazzo wrote: >> On Mon, May 17, 2010 at 9:01 PM, Federico Di Gregorio <fog-NGVKUo/i/[email protected]> wrote: >> >>> print "Always check it build on windows!" >> >> Is there a gcc flag to warn about the issue? > > Mm.. probably -Wdeclaration-after-statement should do. If you think it is safe enough for our ecosystem, I've added the flag to the setup.py. It would break the build if psycopg2 is compiled on "linux2" platforms with something else that gcc (or with pretty old gcc versions: from what I've googled, it seems the flag is not supported on gcc 2.95). If there is a cheap way to detect the compiler/version, the flag could be applied in a more specific situation. "self.get_compiler()" (mostly used to compile on Windows) only returns "unix". -- Daniele