3 ms·
Any language that lets you omit braces for single statements is prone to this bug, which includes C++.
by laureny 13y ago
Any language that lets you omit braces for single statements is prone to this bug, which includes C++.
- hub_ 13y agoSuggestion to clang and gcc developer: implement -Wmandatory-curly-braces At least, short of making it mandatory it would at least signal bad style.
- nikbackm 13y agoWell it was mostly a tongue-in-cheek comment (was thinking of yesterday's C++ exception topic), but essentially true as you would not have used the "if + goto" with C++ error handling. Of course you can write the same bug (and more) in C++ too.