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


On Thu, 9 Aug 2007, DJ Delorie wrote:

| 
| > | I'm working on it now.
| > 
| > awesome!
| 
| How's this look?  The classification state change tree is in the
| diagnostic context, but the actual structure is opaque.  The push/pop
| stack is separate, stored in c-pragma.c.  This way, the save/restore
| can be used for scope-level diagnostic state once we figure out how to
| define that, via a (save A, restore B, restore A) for now.  At some
| point, I suppose we could pass the state pointer itself to the
| diagnostic reporting functions.


Looks good.

Stylistic note:  please could you add a 

  typedef struct diagnostic_classification_state_t
             diagnostic_classification_state_t;

and use the typedef instead?


Is it correct that the "user interface" now is to say
  
    #pragma GCC push
    #pragma GCC diagnostics ignore "-Wcast-qual

    ....

   #pragma GCC pop

?

If yes, is the "push" necessary?  Can we make it implicit?


Many thanks for working on this.

-- Gaby


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