The problem with -fpermissive #11402
Labels
Component: Compilation
Related to compilation of Arduino sketches
Type: Bug
Type: Duplicate
Another item already exists for this topic
Today a user from the German Arduino Facebook Group ran into a problem with switch/case producing invalid code. After some hours of searching, it turns out the culprit is the -fpermissive flag in Arduino.
This code should never ever compile, but it does thanks to the flag:
This is serious business, because the compiler produces an invalid assembly that skips instructions randomly, and the compiler doesn't even give an error.
I know why -fpermissive was introduced and also read the discussion here: #5021 (comment)
and here: arduino/ArduinoCore-avr#268
But accepting invalid and crashing code just because Arduino wants to support bad written libs and likes to suppress all warning is just non sense.
What are the plans for the flag?
The text was updated successfully, but these errors were encountered: