This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add a __nowarn__ keyword
- From: DJ Delorie <dj at redhat dot com>
- To: Magnus Fromreide <magfr at lysator dot liu dot se>
- Cc: joseph at codesourcery dot com, gdr at cs dot tamu dot edu, mark at codesourcery dot com, lopezibanez at gmail dot com, ghazi at caip dot rutgers dot edu, gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Nov 2009 18:27:08 -0500
- Subject: Re: Add a __nowarn__ keyword
- References: <46B9F0B5.1080302@gnu.org> <Pine.GSO.4.58.0708081517560.25407@caipclassic.rutgers.edu> <xnfy2toldl.fsf@greed.delorie.com> <Pine.GSO.4.58.0708081837320.25805@caipclassic.rutgers.edu> <200708082254.l78MsIC8014802@greed.delorie.com> <Pine.GSO.4.58.0708082227420.26657@caipclassic.rutgers.edu> <20070809134017.GA10368@caradoc.them.org> <Pine.GSO.4.58.0708091005500.9702@caipclassic.rutgers.edu> <20070809143028.GA14681@caradoc.them.org> <6c33472e0708090805t210191f6r63832af3afdd0816@mail.gmail.com> <200708091531.l79FVI4w032104@greed.delorie.com> <46BB93CD.7070300@codesourcery.com> <87hcn8885y.fsf@soliton.cs.tamu.edu> <200708100200.l7A20oe8001939@greed.delorie.com> <Pine.LNX.4.64.0708092209171.23077@gauss.cs.tamu.edu> <200708100327.l7A3RUbm005253@greed.delorie.com> <Pine.LNX.4.64.0708092240450.23077@gauss.cs.tamu.edu> <200708100359.l7A3xEOq005749@greed.delorie.com> <Pine.LNX.4.64.0708092307290.23077@gauss.cs.tamu.edu> <200708101839.l7AIdG0h022971@greed.delorie.com> <Pine.LNX.4.64.0708111911250.12511@digraph.polyomino.org.uk> <200708210221.l7L2LRFW022114@greed.delorie.com> <1258804597.1930.7.camel@sara.home>
> Whatever happened to the #pragma GCC diagnostic push/pop patch? From
> the mailing list it sounded as if it was destined to be added but
> then everything just disappeared.
If you're talking about the work I did, at the time I was working on
it, I needed the new "location pointer" code (Pretty sure that's not
the right name). By the time that functionality was added and made
the default, I was on to another project and didn't have time to go
back and update the patch.
The basic idea was that the diagnostic machinery would keep track of
the line numbers for each #pragma, so it could keep various groups of
settings and find the right group based on the line number that the
diagnostic was generated by. That would only work if we had a
"location" which was a single monotonic value relative to the
preprocessed source, so we could easily and accurately search the
"source space".
So, each push made a copy of the settings data and noted the location.
Each pop noted the location and went back to the previous data. Each
diagnostic finds the right data set and uses it.