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

Joseph C. Sible <josephcsible at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |josephcsible at gmail dot com

--- Comment #3 from Joseph C. Sible <josephcsible at gmail dot com> ---
(In reply to Martin Sebor from comment #2)
> I wonder if discouraging this pattern by warning on it and suggesting the
> simpler alternative would be worthwhile (either in addition to or in lieu of
> the optimization) to help avoid typos resulting from copy-and-paste mistakes
> that cannot very well be detected.

I don't see how such a warning would be particularly useful in practice.
Wouldn't one of these two things have to be true?

1. It would only warn you when you used the typo-prone pattern but didn't
actually make any typos in it
2. The warning would trigger in code where the author intentionally breaks the
pattern for some cases

Reply via email to