This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: named warnings & individual warning control
- From: "Gabriel Dos Reis" <gdr at acm dot org>
- To: "DJ Delorie" <dj at redhat dot com>
- Cc: mark at codesourcery dot com, gcc at gcc dot gnu dot org
- Date: Sat, 3 Jul 2004 01:11:47 +0200 (CEST)
- Subject: Re: named warnings & individual warning control
- References: <200406211908.i5LJ8mCX027121@greed.delorie.com> <40D7CF2B.2030405@codesourcery.com> <200406221400.i5ME0QjE002663@greed.delorie.com> <40D85A29.9070503@codesourcery.com> <200406221714.i5MHEM6i005590@greed.delorie.com> <40D86E05.8070805@codesourcery.com> <200406221850.i5MIo2S0007045@greed.delorie.com> <40D88578.6080306@codesourcery.com> <200406242210.i5OMAwbp023722@greed.delorie.com> <40DBB1D7.6070108@codesourcery.com> <200406282056.i5SKu4oL029790@greed.delorie.com> <200407012126.i61LQfvU001865@greed.delorie.com>
- Reply-to: gdr at acm dot org
DJ Delorie:
>
>> Take our existing functions, like warning(), and add a parameter that
>> indicates the warning group the message is in.
>
> Technical question: There are a couple of places in the source where
> we have a function pointer, and set it to one of {warning, error,
> pedwarn}. Thus, to add a parameter to warning() means adding a
> parameter to pedwarn() (probably a good idea) and error() (probably a
> bad idea). Further, we have pedwarn_c90() and pedwarn_c99() which
> should probably have the same function signature as pedwarn().
>
> Alternate, we could provide a warning0() function that does warning(0,
> ...) (or the equivalent) and use that for these cases where we have a
> pointer to it or something else.
>
> Comments?
I don't think I believe in the warning0 thingy. Taking
warning() or error() isn't good either. What about
issue_diagnostic()? If too long, take any verb for diagnostic.