[Bug fortran/30929] -pedantic-error produced only warnings and no errors
--- Comment #3 from manu at gcc dot gnu dot org 2007-03-05 17:05 --- I am not sure if gfortran diagnostics are different, but... are you sure that particular warning is a pedantic warning and not simply an unconditional warning? AFAIK, pedantic-errors will turn only pedantic warnings into errors, other warnings will still be warnings unless -Werror. -- manu at gcc dot gnu dot org changed: What|Removed |Added CC||manu at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
[Bug fortran/30929] -pedantic-error produced only warnings and no errors
--- Comment #4 from burnus at gcc dot gnu dot org 2007-03-05 18:08 --- I am not sure if gfortran diagnostics are different, I think gfortran handles the warnings quite different, not that I know much about the details of the C frontend. but... are you sure that particular warning is a pedantic warning and not simply an unconditional warning? primary.c: if (x_hex pedantic primary.c- (gfc_notify_std (GFC_STD_GNU, Extension: Hexadecimal This gives only an error with pedantic set (and -std=f95 or -std=f2003). Otherwise, -pedantic is quite interwoven with the rest: options.c, e.g.: if (pedantic) { gfc_option.warn_ampersand = 1; gfc_option.warn_tabs = 0; } No idea how to untangle -pedantic from -Wtabs or -Wampersand if -pedantic-errors has been given, but -Werror has not. Silently accepting and ignoring it, seems not to be the right way. The simple solution is not to accept -pedantic-errors (and to point to -Werror) or to turn on -Werror for -pedantic-errors. Both are rather easy solutions - and feel a bit clumsy. It needs presumably quite a lot of work to support -pedantic-errors properly. First and simpler step should be to change Warning: into Error: for -Werror to be in line with the C front end. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
[Bug fortran/30929] -pedantic-error produced only warnings and no errors
--- Comment #5 from manu at gcc dot gnu dot org 2007-03-05 18:15 --- (In reply to comment #4) I am not sure if gfortran diagnostics are different, I think gfortran handles the warnings quite different, not that I know much about the details of the C frontend. Ah, OK. Then forget anything that I said. -- manu at gcc dot gnu dot org changed: What|Removed |Added CC|manu at gcc dot gnu dot org | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
[Bug fortran/30929] -pedantic-error produced only warnings and no errors
--- Comment #1 from burnus at gcc dot gnu dot org 2007-02-27 15:33 --- The same is true for -Werror. Warnings still give an exit status code of zero. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
[Bug fortran/30929] -pedantic-error produced only warnings and no errors
--- Comment #2 from burnus at gcc dot gnu dot org 2007-02-27 23:33 --- The same is true for -Werror. I have to correct myself: -Werror gives a non-zero exit status, but still writes Warning:. I think gfortran should follow gcc by changing also the label from Warning: to Error: for -Werror. -pedantic-errors seems to be difficult as it is hard to divide -Wall warnings from -pedantic warnings. The easiest way is probably to imply -Wall by -pedantic_errors (defined in flags.h as flag_pedantic_errors). -- burnus at gcc dot gnu dot org changed: What|Removed |Added Summary|-pedantic-error produced |-pedantic-error produced |only warnings and no errors |only warnings and no errors http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929