[PATCH 1 of 2] setup: enable pedantic warning of gcc to catch MSVC compatibility issue

Yuya Nishihara yuya at tcha.org
Tue Apr 23 11:27:13 CDT 2013


On Mon, 22 Apr 2013 15:16:49 -0500, Matt Mackall wrote:
> On Fri, 2013-04-19 at 01:39 +0900, Yuya Nishihara wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1366302847 -32400
> > #      Fri Apr 19 01:34:07 2013 +0900
> > # Node ID d81cbdba4275b4bbba564993c2918378ea9d7388
> > # Parent  7d31f2e42a8afb54c8fae87e8e3e29a63578aea4
> > setup: enable pedantic warning of gcc to catch MSVC compatibility issue
> > 
> > MSVC is strict for the mixed declaration and code, which is invalid in C89.
> > 
> > CFLAGS has no effect except for Unix-like environment. But I'm a bit afraid
> > this change might have a platform-specific issue. I've tested with gcc and
> > clang (Linux amd64) and MSVC.
> 
> Pretty sure we've got some non-gcc-like Unix compilers out there, for
> instance on AIX.

Ah, thanks.

It seems there's no quick way to specify compiler-dependent flags in distutils,
so I'll set CFLAGS manually:

    % make local CFLAGS='-pedantic -Wno-long-long'

Regards,


More information about the Mercurial-devel mailing list