http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57211

--- Comment #2 from Anthony Foiani <anthony.foiani at gmail dot com> ---
I'm also seeing this bug, in version 4.7.2.

Instead of trying to fix the line offset, I believe the right thing is to not
emit this warning in this case at all.

The parameter is certainly used, even if the synthesized method uses a
different formal argument name.  (In which case, shouldn't it offer a
corresponding undeclared variable error?)

Put another way: if the method has a signature which can be defaulted, then the
parameter name(s) should be ignored.  (IMHO of course.)

A workaround is to omit the parameter name, but I feel that reduces
readability.  (It also makes some documentation-generating tools sad, e.g.,
doxygen.)

See attached for a version of Matthias's code that shows workaround via macro
flag.

Reply via email to