2 ms·
Run through a state-of-the-art static analysis tool with no warnings? That's seriously stringent. And then, rule 23: "All #else, #elif and #endif preprocesso
by AnimalMuppet 8y ago
Run through a state-of-the-art static analysis tool with no warnings? That's seriously stringent.
And then, rule 23: "All #else, #elif and #endif preprocessor directives shall reside in the same
file as the #if or #ifdef directive to which they are related." It never even occurred to me that anyone might do otherwise, but yeah, that's a real good thing to forbid. (I once failed to close a C-style comment at the end of an include file. It was the last include file, so the next couple of lines in the C file were commented out - which happened to be the main() function name and the opening curly brace. It then treated the rest of main() as file-level variable declarations, which was fine until we got to the actual code. I got 1800 compiler errors from that...)
- as-j 8y agoYou know rule 23 exists for a reason, someone thought it would be a good idea.....egads, I wonder what evil horrible thing they did.