Re:C uses "&" for the address-operator because 'ampersand so...
by flohofwoe on Tuesday October 10, 2023 @10:07AM
(#37832306)
Clang actually doesn't warn in -Wextra:
https://www.godbolt.org/z/99ejvY9Pc
It requires the separate option -Wimplicit-fallthrough:
https://www.godbolt.org/z/GP576zG9h
(which tbh sounds like a bug, because usually Clang tries to emulate GCC behaviour)
Re:C uses "&" for the address-operator because 'ampersand so...
by a_e_k on Tuesday October 10, 2023 @12:57PM
(#37834588)
C++17 now has standardized the [[fallthrough]] attribute:
https://en.cppreference.com/w/cpp/language/attributes/fallth...
(For backwards compatibility, it still must fallthrough with or without the attribute; the attribute just signals programmer intention and silences the warning.)
Pity the (wo)man who does not use -Wall -Wextra for (s)he is truly mistaken