Content deleted Content added
→Other ways of securing code: !howto Tags: Mobile edit Mobile web edit Advanced mobile edit |
m Remove incorrect code comments, compilers will not remove default sections even if all possible enum values are covered. Compilers are not allowed to do this due to enums having more bit patterns than they have named members. A compilable example can be found here https://godbolt.org/z/hnKv7h8as |
||
Line 62:
}
return "black"; // To be handled as a dead traffic light.
}
</syntaxhighlight>
Line 77 ⟶ 74:
}
assert(0); // Assert that this section is unreachable.
}
</syntaxhighlight>
|