Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1)

2018-10-22 Thread Bernd Petrovitsch
Hi all! On 22/10/18 19:54, Nick Desaulniers wrote: > On Mon, Oct 22, 2018 at 10:50 AM Bernd Petrovitsch > wrote: [...] >> PS: clang++ errors with "fallthrough annotation in unreachable code" if >> [[fallthrough]] is after an assert(). clang-devs there, please, th

Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1)

2018-10-22 Thread Bernd Petrovitsch
Hi all! On 22/10/18 13:07, Miguel Ojeda wrote: > On Mon, Oct 22, 2018 at 12:54 PM Dan Carpenter > wrote: >> >> Doing both is super ugly. Let's just do comments until Eclipse gets >> updated. Yes, "Eclipse" as the IDE. And yes but IMHO better super ugly than loosing the warning - YMMV. For th

Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1)

2018-10-22 Thread Bernd Petrovitsch
On 22/10/18 12:27, Dan Carpenter wrote: [...] > What does that even mean? Use both the attribute and the comment until > Eclipse is updated? > > case 3: > frob(); > __fall_through; /* fall through */ > case 4: > > That seems like a wrong idea... It's more

Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1)

2018-10-22 Thread Bernd Petrovitsch
ot; has the same "problem". > If the conversion from /* fallthrough */ to the __fallthrough__ > attribute means that we start gethting a lot of Coverity warnings, We could keep both. MfG, Bernd -- Bernd Petrovitsch Email : be...@petrovitsch.priv.at LUGA : http://www.luga.at