News for hackers. Stuff that matters.
Re:C uses "&" for the address-operator because 'ampersand so... by cassepipe on Tuesday October 10, 2023 @09:34AM (#37831902)
Note that gcc and clang will warn you about fallthrough statements i you use -Wextra and that you have to either have insert a /fallthrough/ comment to make your intent clear.

Pity the (wo)man who does not use -Wall -Wextra for (s)he is truly mistaken

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.)