switch/default -- enum, want compiler error
Hal Murray
halmurray at sonic.net
Sun Apr 12 21:27:03 UTC 2026
[Context is -Wswitch-enum]
> Neat. That found some stuff in gpsd that will take some time to fix.
The plot thickens.
It turns out that -Wswitch-enum was already in wscript. It gets added if
you config with --enable-warnings
There is a table of options to try. One might expect that it would add
the ones that worked. I did. But it doesn't work that way. There is a
bunch of code below that does
If the flag we set when it worked, then add it to CFLAGS.
So when I added -Wswitch-enum to the table, that didn't actually add it to
CFLAGS, but it was already getting added to CFLAGS so I got confused while
testing my changes.
I tried adding things to CFLAGS if the check worked. That broke the
checking stuff. I think we should be able to fix the tiny code chunks so
they are good clean code, but I didn't go down that rathole.
I found one slot in the table that didn't have the test/add below.
We should be able to turn that chunk of code into a loop.
If I have the text form of a variable name, how to I turn that info a name
for the python compiler? That is if I have:
foo = "mumble"
how do I do?
if xx.mumble: ...
--
These are my opinions. I hate spam.
More information about the devel
mailing list