[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: Re: [gentoo-dev] How to support C++11 in =?iso-8859-1?Q?libraries=3F?=
From: Jan_Kundrát <jkt () gentoo ! org>
Date: 2013-12-20 12:45:37
Message-ID: e97d92da-adfd-4a4e-9eb3-fa1958ff5f63 () gentoo ! org
[Download RAW message or body]
On Friday, 20 December 2013 12:56:43 CEST, Sven Eden wrote:
> And no, the languages are _not_ "source-incompatible". That would be a
> scandal!
You might argue about this, but that doesn't change these facts. This is
absolutely valid C++98 program:
jkt@svist ~ $ cat foo.cpp
int main() {
auto int foo;
return 0;
}
jkt@svist ~ $ g++ -std=c++98 -pedantic foo.cpp
jkt@svist ~ $ echo $?
0
...which will *not* build under the C++11 mode:
jkt@svist ~ $ g++ -std=c++0x foo.cpp
foo.cpp: In function ‘int main()':
foo.cpp:2:14: error: two or more data types in declaration of ‘foo'
Yes, -Wc++0x-compat warns about this, yes, it's included in -Wall, but it
does not change the fact that there *is* code out there which does conform
to C++98 standard, does *not* try to "outsmart the compiler", and which
will not build in the C++11 mode. Do we really have to be having this
discussion?
Cheers,
Jan
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic