The following fragment prints "wrong" for me:

   #if 2 > 1 ? 0 : 0 ? 1 : 1
   wrong
   #endif

when run through the preprocessor (either gcc -E or cpp).

This occurs with Debian stable's gcc:

   Using built-in specs.
   Target: x86_64-linux-gnu
   Configured with: ../src/configure -v --with-pkgversion='Debian
   4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
   --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
   --enable-shared --with-system-zlib --libexecdir=/usr/lib
   --without-included-gettext --enable-threads=posix --enable-nls
   --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
   --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
   --enable-mpfr --enable-cld --enable-checking=release
   --build=x86_64-linux-gnu --host=x86_64-linux-gnu
   --target=x86_64-linux-gnu
   Thread model: posix
   gcc version 4.3.2 (Debian 4.3.2-1.1) 

as well as with the gcc 4.1 used by CentOS and NetBSD. The Debian one
is unfortunately the latest gcc I have ready access to. However, this
is obscure enough that I'm assuming nobody else is likely to have
noticed it in the meantime.

See http://gnats.netbsd.org/44253 for a more elaborate example.

-- 
   - David A. Holland / dholl...@eecs.harvard.edu

Reply via email to