https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127044
--- Comment #6 from Evgeny Grin <k2k at drgrin dot dev> ---
Either GCC behaviour should be corrected or the documentation.
Nowhere in the documentation is mentioned that
__attribute__((assume(statement))) is a declaration.
It is not obvious and counter-intuitive.
Again, __attribute__((fallthrough)) is documented exactly the same and does not
trigger any warning in the code like
switch (a)
{
case 0:
a++;
__attribute__((fallthrough));
case 1:
a++;
break;
}
If __attribute__ is a declaration (strange, but still) than fallthrough must
trigger the warning too.