public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: gcc's cpp makes ?: left-associative
@ 2010-12-20 12:10 Jonathan Wakely
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Wakely @ 2010-12-20 12:10 UTC (permalink / raw)
  To: David Holland; +Cc: gcc-bugs

The correct way to report bugs is via bugzilla, as described at
http://gcc.gnu.org/bugs/

The gcc-bugs list consists almost entirely of auto-generated mail from
bugzilla so mails sent there can be missed and they don't get tracked
in bugzilla.

GCC 4.4 and later have the right result, but I don't know when it was fixed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc's cpp makes ?: left-associative
  2010-12-20 11:30 David Holland
@ 2010-12-20 11:54 ` Joseph S. Myers
  0 siblings, 0 replies; 3+ messages in thread
From: Joseph S. Myers @ 2010-12-20 11:54 UTC (permalink / raw)
  To: David Holland; +Cc: bug-gcc

On Mon, 20 Dec 2010, David Holland wrote:

> 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.

This no longer appears and was probably fixed by:

2008-05-06  Tom Tromey  <tromey@redhat.com>

        PR preprocessor/35313, PR preprocessor/36088:
        * expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
        (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.

-- 
Joseph S. Myers
joseph@codesourcery.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* gcc's cpp makes ?: left-associative
@ 2010-12-20 11:30 David Holland
  2010-12-20 11:54 ` Joseph S. Myers
  0 siblings, 1 reply; 3+ messages in thread
From: David Holland @ 2010-12-20 11:30 UTC (permalink / raw)
  To: bug-gcc

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 / dholland@eecs.harvard.edu


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-20 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 12:10 gcc's cpp makes ?: left-associative Jonathan Wakely
  -- strict thread matches above, loose matches on Subject: below --
2010-12-20 11:30 David Holland
2010-12-20 11:54 ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).