warning message control: check for enabled warnings
DJ Delorie
dj@redhat.com
Mon May 2 19:40:00 GMT 2005
> I think warn_show_options is not a "warning option", and should be
> a field of "diagnostic_info" (diagnostic.h) -- it should be
> -fdiagnostic-show-option, similar to
> -fdiagnostic-show-location=[once,never]. OK with that change.
Changing the option is easy, but I'm confused about the other part -
did you just want me to copy the OPT_W* to the diagnostic_info, and
have diagnostic_report_diagnostic add the text to the message when
appropriate? Or did you also want me to add a boolean in
diagnostic_context to remember to do that, with a hook to print it, or
what?
The simple change is to add a field in diagnostic_info that stores the
OPT_*, and move the existing if/ACONCAT into diagnostic_report_diagnostic.
Is this what you meant?
Are you thinking that, at some point in the future, we could print a
separate "this option is controlled by ..." line, with print-once
logic for each option? I would argue against that until we can assure
that no two different warnings used the same option, but I can see its
utility at that point.
More information about the Gcc-patches
mailing list