generator: remove ifdef __cplusplus on enum sizes
While this does not solve #961 completely, it will make the compiler error when sized enums are supported.
I experimented somewhat with adding a preprocessor check, but it seems that GCC extends enum sizes to older C standards, since the enum_sizes test passes without it and fails to compile when I add that.
Yup, seems like GCC extends this extension to all versions of C.
This will absolutely break some builds, but at least it will be broken builds instead of faulty software.
Looking around: this is supported as an extension for all C standards since GCC 13, and clang in the 2021 timeframe. ARM GNU Toolchain 13 was released last year.
I am not entirely sure how to modify test scripts and/or CI to actually have the CI pass.
I wonder if it is the -ansi that makes GCC not like it in the test case.
The compiler options could be modified for that test case like is done in anonymous_oneof/SConscript
I wonder whether MSVC supports this.
I wonder if it is the -ansi that makes GCC not like it in the test case.
That, and the compiler version. Best I can tell, this was added in GCC 13, possibly 12, and your CI runs on Ubuntu 20.04. Unless you're setting up a non-default compiler, that means GCC 9.
I think this is obsoleted by b34a649c524