Tag: gcc-pedantic
-
Why is a stray semicolon no longer detected by `-pedantic` modern compilers?
6 The following snippet generates compilation errors on adding -pedantic and -Werror on compilers that are a bit old. #include <cstdint> #include <iostream> int add(int a, int b){ return a + b; }; // <– stray semicolon int main (){ return 0; } However this does not happen newer compiler versions. Please find a matrix…