On 20 May 2011 07:49, Dr. David Kirkby wrote: > On 05/20/11 06:23 AM, Miles Bader wrote: >> >> "Dr. David Kirkby"<david.kirkby@xxxxxxxxxx> writes: >>>> >>>> Stick with GCC and you will be happy. >>> >>> That's if you want to write in GNU C++ and don't care about writing >>> standard C++ code. >> >> ... or are capable of adding a "-std=..." option. > > BUT IMHO, the default should be to use the standard C++, not a set of > extensions GCC permits. Have you seen the default C++ standard library used by the Sun compiler? Or its treatment of the lifetime of temporaries? (See -features=tmplife) And it allows __thread by default, but it's a non-standard extension - the horror! > In any case, that does not work well. > > drkirkby@hawk:~$ cat test.cc > #include <iostream> > using namespace std; > > int main() { > int a=0b1111111; > cout << a; > } > > drkirkby@hawk:~$ g++ -std=c++98 -Wall test.cc > drkirkby@hawk:~$ ./a.out > 127drkirkby@hawk:~$ > > I don't have an official copy of the latest standard, but I don't believe 0b > is anything other than a GNU extension. > > http://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html Yes, it's an extension, so use -pedantic as documented in the manual.