This is the mail archive of the 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: [warnings] tagging warnings about options themselves (DJ Delorie)  wrote on 25.07.05 in <>:

> A thought occurs to me: we could make warning() a macro that passes
> __FILE__ and __LINE__ to the diagnostic machinery, and if there's no
> OPT_ value it can make one up from the file/line (like
> -Wc_common_c_456).  The only time the user would *ever* see this is if
> they used -fdiagnostics-show-option, and we could emit a note the
> first time they see one of these that says it's version-specific.  It
> would be useful to developers too, especially when we've got lots of
> same-wording diagnostics all over the place.
> It would probably mess up the "unknown -W option" logic though.

I'd prefer a slightly different version - have a -fwarning-source or so  
option to tag that info onto every warning. That way you can easily locate  
where the particular warning came from. Only useful if you have source, of  
course, and if you can read C, but there are enough people for whom that  
works or can easily be made to work.

On one or two occasions, using the source was the only way for me to  
understand a warning. (Or was that an error? Same logic applies there.)

MfG Kai

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