This is the mail archive of the gcc@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]

[RFC] __extension__ and warnings


I've been looking into PR 7263 about __extension__ not turning off
warnings about LL and ULL.

Not surprisingly, our treatment of warn_long_long is quite inconsistent
within front ends, and with cpplib, and with use of __extension__.

Getting things 100% right with __extension__ is hard, and would uglify
the parsers further.  I don't think the pain is worth the gain, and I
don't want to go there.  At present we turn of pedantic, warn_traditional,
warn_pointer_arith and flag_iso in the C front end, and pedantic in the
C++ front end.

I propose a simpler solution: simply do not emit any pedwarns whilst inside
the code affected by __extension__.  This is easy to implement inside
pedwarn() itself.

With this, I can clear up some confused and confusing warning logic, and fix
its interaction with cpplib's number interpreter.  Thoughts?

Neil.


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