This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]