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


DJ Delorie wrote:

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().


I think passing the parameter to "error" is a good idea too. For example, in the case that the user requests that diagnostics contain links back to the relevant standard, you could use the tag passed in to find that information. (At first, we will not have enough specificity to do that, but later...)

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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