[PATCH] tests: Add break to avoid implicit-fallthrough warning

Florian Weimer fweimer@redhat.com
Fri Dec 6 16:21:00 GMT 2019

* Mark Wielaard:

> For some reason gcc might fail to recognize the assert (0) will never
> return and emit an implicit-fallthrough warning. Just add a break to
> silence it.

Is this with -DNDEBUG?  assert (0) expands to basically nothing in that
case.  I'm not sure if we should change that.  We cannot realistically
emit __builtin_unreachable in that case, I think, because it would make
writing incorrect asserts *really* risky with -DNDEBUG.


More information about the Elfutils-devel mailing list