public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/22168] New: #if #A == #B should have a diagnostic
@ 2005-06-24  2:04 geoffk at gcc dot gnu dot org
  2005-06-24  9:06 ` [Bug preprocessor/22168] " schwab at suse dot de
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2005-06-24  2:04 UTC (permalink / raw)
  To: gcc-bugs

GCC quietly accepts the following:

#define A a
#define B a
#if #A == #B
#endif

but it should not, because '#A == #B' is not an integer constant expression, see C99 section 6.10.1 
paragraph 1.  GCC does properly diagnose

#if "a" == "a"

-- 
           Summary: #if #A == #B should have a diagnostic
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: geoffk at gcc dot gnu dot org
                CC: dje at gcc dot gnu dot org,gcc-bugs at gcc dot gnu dot
                    org
 GCC build triplet: *
  GCC host triplet: *-*-*
GCC target triplet: *


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


^ permalink raw reply	[flat|nested] 20+ messages in thread
[parent not found: <bug-22168-638@http.gcc.gnu.org/bugzilla/>]

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

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-24  2:04 [Bug preprocessor/22168] New: #if #A == #B should have a diagnostic geoffk at gcc dot gnu dot org
2005-06-24  9:06 ` [Bug preprocessor/22168] " schwab at suse dot de
2005-06-24 14:56 ` neil at gcc dot gnu dot org
2005-06-24 15:19 ` geoffk at gcc dot gnu dot org
2005-06-24 15:26 ` schwab at suse dot de
2005-06-24 15:42 ` [Bug preprocessor/22168] New: " Andrew Pinski
2005-06-24 15:42 ` [Bug preprocessor/22168] " pinskia at physics dot uc dot edu
2005-06-24 18:02 ` [Bug preprocessor/22168] #if #A == #B should have a diagnostic in ISO C mode geoffk at gcc dot gnu dot org
2005-06-24 22:24 ` neil at gcc dot gnu dot org
2005-06-24 22:26 ` pinskia at gcc dot gnu dot org
2005-06-24 22:41 ` schwab at suse dot de
2005-06-24 23:09 ` joseph at codesourcery dot com
2005-06-25 22:11 ` jsm28 at gcc dot gnu dot org
     [not found] <bug-22168-638@http.gcc.gnu.org/bugzilla/>
2006-12-29  2:54 ` tromey at gcc dot gnu dot org
2007-01-01 21:57 ` patchapp at dberlin dot org
2007-01-08  1:33 ` tromey at gcc dot gnu dot org
2007-05-21  8:54 ` manu at gcc dot gnu dot org
2008-02-26 20:49 ` tromey at gcc dot gnu dot org
2008-05-13 14:52 ` tromey at gcc dot gnu dot org
2008-05-13 15:22 ` 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).