#!/bin/bash cat << EOF > test.cpp enum class foo : char { A, B }; int main() { foo a = foo::A; return (a == foo::A) ? 1 : 0; } EOF $ g++-4.4 -std=c++0x test.cpp test.cpp: In function ‘int main()’: test.cpp:11: error: invalid operands of types ‘foo’ and ‘foo’ to binary ‘operator==’ $ gcc-4.4 -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4-20090418-1ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.4.0 20090419 (prerelease) [gcc-4_4-branch revision 146360] (Ubuntu 4.4-20090418-1ubuntu3)
*** This bug has been marked as a duplicate of 38064 ***