[Bug fortran/30929] -pedantic-error produced only warnings and no errors
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Mar 5 18:09:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list