https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79883

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-03-16
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  I think the diagnostics in config/avr/avr.c are simply
unfortunately worded.  They are parameterized on the name of the attribute the
functions they refer to are decorated with, but they use the name of the
attribute as a plain English word, no doubt for brevity.  There should be a way
to reword them to avoid the problems pointed out here without making them
overly verbose.  For example, this warning:

 warning_at (loc, OPT_Wmisspelled_isr, "%qs appears to be a misspelled "
              "%s handler, missing __vector prefix", name, isr);

could be worded like so:

 warning_at (loc, OPT_Wmisspelled_isr, "%qs with attribute %qs is "
             "missing the %<__vector%> prefix", name, isr);

(with the __vector prefix quoted because it's part of the identifier).

Similarly this error

  error_at (loc, "%qs function cannot have arguments", isr);

could be worded like this:

  error_at (loc, "%qs with %qs attribute cannot have arguments", name, isr);

(I.e., if the warning mentions the name of the function so should the error,
for consistency.)

Reply via email to