This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: named warnings & individual warning control
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: mark at codesourcery dot com, gcc at gcc dot gnu dot org
- Date: 05 Jul 2004 18:13:28 -0300
- Subject: Re: named warnings & individual warning control
- Organization: Red Hat Global Engineering Services Compiler Team
- 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><40E576FF.6080807@codesourcery.com><200407021610.i62GAMLG011936@greed.delorie.com>
On Jul 2, 2004, DJ Delorie <dj@redhat.com> wrote:
> I wonder how we would tie in error() calls with this
We could support controlling whether certain constructs are to be
flagged with errors, warnings or nothing. But then, we'd probably
want to make the decision in the caller.
Hmm... Maybe the best approach would be to use, instead of a direct
call to warning/error/whatever, have a function that takes as argument
the error/warning identifier and returns a pointer to a function to be
called to report the error. Then we wouldn't change the prototype of
the error-reporting functions, only replace say:
warning (...)
with:
choose_erf (message_id) (...)
(erf stands for error-reporting function)
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}