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

Reply via email to