public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/36088]  New: Unevaluated PP expression rejected
@ 2008-04-30 15:43 neil at gcc dot gnu dot org
  2008-04-30 17:52 ` [Bug preprocessor/36088] " 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-04-30 15:43 UTC (permalink / raw)
  To: gcc-bugs

Compile with pedantic-errors, C99 or C90.

extern int x;
#if 1 ? 0: 1 ? 1/0: 1/0
#endif

Code is fine as the divisions by zero are unevaluated.


-- 
           Summary: Unevaluated PP expression rejected
           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=36088


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

* [Bug preprocessor/36088] Unevaluated PP expression rejected
  2008-04-30 15:43 [Bug preprocessor/36088] New: Unevaluated PP expression rejected neil at gcc dot gnu dot org
@ 2008-04-30 17:52 ` 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 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tromey at gcc dot gnu dot org  2008-04-30 17:51 -------
Confirmed.

The bug is that we look at top[-1].value after overwriting it with the
value of the 'true' branch of the condition.


-- 

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 17:51:38
               date|                            |


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


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

* [Bug preprocessor/36088] Unevaluated PP expression rejected
  2008-04-30 15:43 [Bug preprocessor/36088] New: Unevaluated PP expression rejected neil at gcc dot gnu dot org
  2008-04-30 17:52 ` [Bug preprocessor/36088] " 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 17:51:38         |2008-05-01 19:31:47
               date|                            |


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


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

* [Bug preprocessor/36088] Unevaluated PP expression rejected
  2008-04-30 15:43 [Bug preprocessor/36088] New: Unevaluated PP expression rejected neil at gcc dot gnu dot org
  2008-04-30 17:52 ` [Bug preprocessor/36088] " 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:11 ` tromey at gcc dot gnu dot org
  2008-05-30 15:16 ` tromey 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 36088

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=36088


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

* [Bug preprocessor/36088] Unevaluated PP expression rejected
  2008-04-30 15:43 [Bug preprocessor/36088] New: Unevaluated PP expression rejected 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:11 ` tromey at gcc dot gnu dot org
  2008-05-30 15:16 ` tromey 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:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tromey at gcc dot gnu dot org  2008-05-06 18:10 -------
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=36088


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

* [Bug preprocessor/36088] Unevaluated PP expression rejected
  2008-04-30 15:43 [Bug preprocessor/36088] New: Unevaluated PP expression rejected neil at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-05-06 18:11 ` tromey at gcc dot gnu dot org
@ 2008-05-30 15:16 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-05-30 15:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tromey at gcc dot gnu dot org  2008-05-30 15:15 -------
Not a regression, so I'm closing it.


-- 

tromey at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-05-30 15:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-30 15:43 [Bug preprocessor/36088] New: Unevaluated PP expression rejected neil at gcc dot gnu dot org
2008-04-30 17:52 ` [Bug preprocessor/36088] " 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:11 ` tromey at gcc dot gnu dot org
2008-05-30 15:16 ` tromey 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).