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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dmalcolm at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this bug.

We already issue a warning for this within -Wall, via -Wunused-label (since
sometime at or before gcc 4.4, I think):

test.c: In function ‘main’:
test.c:18:3: warning: label ‘case2’ defined but not used [-Wunused-label]
   case2:
   ^~~~~

I think that if the user accidentally omits the space between the "case" and
the value, they're unlikely to also have a reference to that label name.

Marking this one as resolved.  Feel free to reopen if I'm missing something
here.

Reply via email to