[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] using -std=c++0x instead of -std=c++98?

From: Greg Chicares
Subject: Re: [lmi] using -std=c++0x instead of -std=c++98?
Date: Wed, 17 Mar 2010 19:32:08 +0000
User-agent: Thunderbird (Windows/20090812)

On 2010-03-17 18:38Z, Vaclav Slavik wrote:
> gcc 4.4 with -pedantic-errors (but not without it) complains about wx
> 2.9 code when compiling LMI:
>         wx/log.h:975:1: error: invoking macro _WX_VARARG_DO_CALL_WCHAR
>         argument 1: empty macro arguments are undefined in ISO C90 and
>         ISO C++98
> Apparently, it's an ambiguity in the standard that gcc now checks for:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33305
> This is resolved in C++0x, so by far the simplest fix would be to use
> -std=c++0x when compiling LMI. Is that acceptable, or do you prefer
> "proper" fix in wx sources?

It's perfectly okay to require '-std=c++0x' instead of '-std=c++98':
lmi doesn't need to be backward compatible with old versions of the
C++ standard in this sense. We do need to remain compatible with the
compiler we use for production (currently MinGW gcc-3.4.5), but that's
not what we're talking about here.

Anyway, '-std=c++0x' is nicer than this atrocity in 'workhorse.make':

cxx_standard := -std=c++98
else ifeq (3.4.5,$(gcc_version))
  # Fix "hello world":
  cxx_standard := -std=gnu++98

reply via email to

[Prev in Thread] Current Thread [Next in Thread]