public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/35313]  New: Valid pp-expression rejected in C99 mode
@ 2008-02-23 13:54 neil at gcc dot gnu dot org
  2008-04-30 18:48 ` [Bug preprocessor/35313] " tromey at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: neil at gcc dot gnu dot org @ 2008-02-23 13:54 UTC (permalink / raw)
  To: gcc-bugs

The following obeys the syntax, semantics and constraints of C99, but is
rejected with -pedantic-errors

extern int x;
#if 0 ? 2,3 : 2
#endif


-- 
           Summary: Valid pp-expression rejected in C99 mode
           Product: gcc
           Version: 4.1.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neil at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35313


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

* [Bug preprocessor/35313] Valid pp-expression rejected in C99 mode
  2008-02-23 13:54 [Bug preprocessor/35313] New: Valid pp-expression rejected in C99 mode neil at gcc dot gnu dot org
@ 2008-04-30 18:48 ` tromey at gcc dot gnu dot org
  2008-05-01 19:32 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-04-30 18:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tromey at gcc dot gnu dot org  2008-04-30 18:48 -------
Confirmed.
I think this is related to PR 36088.
I think the operator precedence code is subtly wrong with ?:


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-04-30 18:48:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35313


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

* [Bug preprocessor/35313] Valid pp-expression rejected in C99 mode
  2008-02-23 13:54 [Bug preprocessor/35313] New: Valid pp-expression rejected in C99 mode neil at gcc dot gnu dot org
  2008-04-30 18:48 ` [Bug preprocessor/35313] " tromey at gcc dot gnu dot org
@ 2008-05-01 19:32 ` tromey at gcc dot gnu dot org
  2008-05-06 17:16 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-05-01 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from tromey at gcc dot gnu dot org  2008-05-01 19:31 -------
Testing a patch.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-04-30 18:48:02         |2008-05-01 19:31:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35313


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

* [Bug preprocessor/35313] Valid pp-expression rejected in C99 mode
  2008-02-23 13:54 [Bug preprocessor/35313] New: Valid pp-expression rejected in C99 mode neil at gcc dot gnu dot org
  2008-04-30 18:48 ` [Bug preprocessor/35313] " tromey at gcc dot gnu dot org
  2008-05-01 19:32 ` tromey at gcc dot gnu dot org
@ 2008-05-06 17:16 ` tromey at gcc dot gnu dot org
  2008-05-06 18:10 ` tromey at gcc dot gnu dot org
  2008-07-04 19:45 ` jsm28 at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-05-06 17:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tromey at gcc dot gnu dot org  2008-05-06 17:15 -------
Subject: Bug 35313

Author: tromey
Date: Tue May  6 17:15:07 2008
New Revision: 134989

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134989
Log:
gcc/testsuite
        PR preprocessor/35313, PR preprocessor/36088:
        * gcc.dg/cpp/pr35313.c: New file.
        * gcc.dg/cpp/if-oppr.c: Remove test for ',' in a conditional
        expression.
        * gcc.dg/cpp/if-oppr2.c: New file.
libcpp
        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.

Added:
    trunk/gcc/testsuite/gcc.dg/cpp/if-oppr2.c
    trunk/gcc/testsuite/gcc.dg/cpp/pr35313.c
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/cpp/if-oppr.c
    trunk/libcpp/ChangeLog
    trunk/libcpp/expr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35313


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

* [Bug preprocessor/35313] Valid pp-expression rejected in C99 mode
  2008-02-23 13:54 [Bug preprocessor/35313] New: Valid pp-expression rejected in C99 mode neil at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-05-06 17:16 ` tromey at gcc dot gnu dot org
@ 2008-05-06 18:10 ` tromey at gcc dot gnu dot org
  2008-07-04 19:45 ` jsm28 at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-05-06 18:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tromey at gcc dot gnu dot org  2008-05-06 18:09 -------
Fixed on trunk.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.4.0
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35313


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

* [Bug preprocessor/35313] Valid pp-expression rejected in C99 mode
  2008-02-23 13:54 [Bug preprocessor/35313] New: Valid pp-expression rejected in C99 mode neil at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-05-06 18:10 ` tromey at gcc dot gnu dot org
@ 2008-07-04 19:45 ` jsm28 at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 19:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jsm28 at gcc dot gnu dot org  2008-07-04 19:44 -------
No version of GCC with any C99 support accepted this before 4.4, so not a
regression; closing.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35313


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

end of thread, other threads:[~2008-07-04 19:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 13:54 [Bug preprocessor/35313] New: Valid pp-expression rejected in C99 mode neil at gcc dot gnu dot org
2008-04-30 18:48 ` [Bug preprocessor/35313] " tromey at gcc dot gnu dot org
2008-05-01 19:32 ` tromey at gcc dot gnu dot org
2008-05-06 17:16 ` tromey at gcc dot gnu dot org
2008-05-06 18:10 ` tromey at gcc dot gnu dot org
2008-07-04 19:45 ` jsm28 at gcc dot gnu dot org

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