This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/22168] #if #A == #B should have a diagnostic in ISO C mode
- From: "neil at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2005 22:24:24 -0000
- Subject: [Bug preprocessor/22168] #if #A == #B should have a diagnostic in ISO C mode
- References: <20050624020406.22168.geoffk@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From neil at gcc dot gnu dot org 2005-06-24 22:24 -------
(In reply to comment #6)
> Yup, it's documented. However, it's still silently accepted even with
-pedantic, and the language doesn't
> permit that.
My copy of the standard only requires a constant expression - can you point out
where you read its requiring an integer constant expression?
The standard explicitly permits extensions to constant expressions. Since this
extension is explicitly documented as for use in #if expressions, it should be
obvious that we intend #foo as a constant expression. No diagnostic is
therefore required.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22168