https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|-pedantic-error and -Werror |-pedantic-errors doesn't |don't produce errors! |produce errors! --- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Since at least 4.8 '-pedantic -Werror' gives an error; % gfortran /opt/gcc/work/gcc/testsuite/gfortran.dg/c_by_val_4.f -c -pedantic -Werror /opt/gcc/work/gcc/testsuite/gfortran.dg/c_by_val_4.f:14:6: CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list function" } 1 Error: Unclassifiable statement at (1) /opt/gcc/work/gcc/testsuite/gfortran.dg/c_by_val_4.f:16:6: CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list function" } 1 Error: Unclassifiable statement at (1) but '-pedantic-errors' does not % gfortran /opt/gcc/work/gcc/testsuite/gfortran.dg/c_by_val_4.f -c -pedantic-errors /opt/gcc/work/gcc/testsuite/gfortran.dg/c_by_val_4.f:14:22: CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list function" } 1 Warning: GNU Extension: argument list function at (1) /opt/gcc/work/gcc/testsuite/gfortran.dg/c_by_val_4.f:16:22: CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list function" } 1 Warning: GNU Extension: argument list function at (1) AFAICT '-pedantic-errors' is not handled by the gfortran FE. Note that '-pedantic' may change a warning to an error: % gfortran /opt/gcc/work/gcc/testsuite/gfortran.dg/hollerith8.f90 -pedantic /opt/gcc/work/gcc/testsuite/gfortran.dg/hollerith8.f90:6:17: call wrtout (9hHELLO YOU, 9) 1 Warning: Legacy Extension: Hollerith constant at (1) /opt/gcc/work/gcc/testsuite/gfortran.dg/hollerith8.f90:6:15: call wrtout (9hHELLO YOU, 9) 1 Error: Rank mismatch in argument 'iarray' at (1) (rank-1 and scalar)