This is the mail archive of the gcc@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: named warnings & individual warning control


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}


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