bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] regexec: fix unintentinal fallthrough warning with GCC7


From: Andrei Borzenkov
Subject: Re: [PATCH] regexec: fix unintentinal fallthrough warning with GCC7
Date: Thu, 23 Mar 2017 20:21:56 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

23.03.2017 20:10, Eric Blake пишет:
> 
> Then you get a warning about an unused label.  But how about:
> 
> #ifdef RE_ENABLE_I18N
>     case OP_UTF8_PERIOD:
>       if (ch >= ASCII_CHARS)
>         return false;
>       goto FALLTHROUGH_TO_OP_PERIOD;
>     FALLTHROUGH_TO_OP_PERIOD:
> #endif
> 
>     case OP_PERIOD:
> 

Yes, works too. Although it probably needs comment explaining what happens.

Although this looks like some more intelligence on GCC side may cause it
to fail again (as we finally do not leave case label at all, so we fall
through ...)

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]