[Bug preprocessor/22168] #if #A == #B should have a diagnostic in ISO C mode

neil at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jun 24 22:24:00 GMT 2005


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



More information about the Gcc-bugs mailing list