So I tend to run with -Werror -Weverything in clang and -Wall -Wextra -pedantic with gcc when compiling. While its possible to #pragma GCC/clang diagnostic ignored whatever push/etc... away the gnu case range extension with an include wrapper, I think its simpler to just remove the use entirely for generated code. No attempt was made to change any of the use in yuck itself.
This removes warnings such as this for clang compiled generated code:
./incipio.yucc:244:13: error: use of GNU case range extension [-Werror,-Wgnu-case-range]
case '0' ... '9':;
^
And this for gcc (same test project):
incipio.yucc: In function 'yuck_parse':
incipio.yucc:244:4: error: range expressions in switch statements are non-standard [-Werror=pedantic]
case '0' ... '9':;
^
So I tend to run with -Werror -Weverything in clang and -Wall -Wextra -pedantic with gcc when compiling. While its possible to #pragma GCC/clang diagnostic ignored whatever push/etc... away the gnu case range extension with an include wrapper, I think its simpler to just remove the use entirely for generated code. No attempt was made to change any of the use in yuck itself.
This removes warnings such as this for clang compiled generated code:
And this for gcc (same test project):
All tests seem to pass with the change: