Note, this mailing list is for development of gcc, gcc-help
would be more appropriate.
On Fri, Mar 11, 2022 at 07:53:32PM +0000, Larry Jackson via Gcc wrote:
> I goofed and failed to put a space after the "case" word:
>
> switch(nu){
> case1: v1 =val;break;
> case2: v2 =val;break;
> case3: v3 =val;break;
> case4: v4 =val;break;
> }
That is valid code, case1: etc. is a user label, you could goto case1; to
reach it etc. So no wonder you don't get any diagnostics.
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
>
> Apple clang version 13.0.0 (clang-1300.0.29.30)
This means you even aren't using gcc at all but a different compiler.
Jakub