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

Re: Add a __nowarn__ keyword



_Pragma(diagnostic) is implement to obey the same rules as #pragma
diagnostic with regards to placement.  I.e. if you put a _Pragma anywhere
inside a function definition, you will get an error.

Yes, and if we had a "push/pop" mechanism, we could limit _Pragma(diagnostic)'s effect to the current expression in the same way as __extension__/__nowarn__.


Regarding DJ's worry about unit-at-a-time etc., they obviously cannot apply to front-end generated warnings such as these. It is correct that GCC's currently implemented approach does not affect reliably warnings that are generated by the middle-end, but your __nowarn__ patch wouldn't work on them either.

Paolo


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