This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28823] sizeof not handled by pre-processor in #if statement
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2006 21:22:09 -0000
- Subject: [Bug c/28823] sizeof not handled by pre-processor in #if statement
- References: <bug-28823-13139@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-08-23 21:22 -------
(In reply to comment #2)
> Okay, so sizeof isn't part of the pre-processor. That doesn't change the fact
> that the #if as written in the code SHOULD be valid (by every C spec I've
> looked at). Something in gcc is not doing the right thing. Don't just close
> the bug because I made a mistake describing it; it's still a bug!
What spec are you reading? The preprocessor acts way before parsing/semantic
anylsis happens.
This is not a bug as the C preprocessor does not anything about types or any
semantics of C, just themself.
Even ICC rejects this code.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28823