public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors
@ 2007-02-22 21:20 burnus at gcc dot gnu dot org
2007-02-27 15:33 ` [Bug fortran/30929] " burnus at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-22 21:20 UTC (permalink / raw)
To: gcc-bugs
Example:
...testsuite/gfortran.dg> gfortran -c -pedantic-errors c_by_val_4.f ; echo $?
c_by_val_4.f:14.22:
CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list fu
1
Warnung: Extension: argument list function at (1)
c_by_val_4.f:16.22:
CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list fu
1
Warnung: Extension: argument list function at (1)
0
Expected:
- Non-zero exit code
- "Error:" instead of "Warning:"
Have fun when fixing this as several "dg-do run" tests have -pedantic warnings,
-no-pedantic does not exist, and dg.exp contains:
set DEFAULT_FFLAGS " -pedantic-errors"
--
Summary: -pedantic-error produced only warnings and no errors
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/30929] -pedantic-error produced only warnings and no errors
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
@ 2007-02-27 15:33 ` burnus at gcc dot gnu dot org
2007-02-27 23:33 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-27 15:33 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/30929] -pedantic-error produced only warnings and no errors
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
2007-02-27 15:33 ` [Bug fortran/30929] " burnus at gcc dot gnu dot org
@ 2007-02-27 23:33 ` burnus at gcc dot gnu dot org
2007-03-05 17:06 ` manu at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-27 23:33 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/30929] -pedantic-error produced only warnings and no errors
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
2007-02-27 15:33 ` [Bug fortran/30929] " burnus at gcc dot gnu dot org
2007-02-27 23:33 ` burnus at gcc dot gnu dot org
@ 2007-03-05 17:06 ` manu at gcc dot gnu dot org
2007-03-05 18:09 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-03-05 17:06 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/30929] -pedantic-error produced only warnings and no errors
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-03-05 17:06 ` manu at gcc dot gnu dot org
@ 2007-03-05 18:09 ` burnus at gcc dot gnu dot org
2007-03-05 18:15 ` manu at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-05 18:09 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/30929] -pedantic-error produced only warnings and no errors
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-03-05 18:09 ` burnus at gcc dot gnu dot org
@ 2007-03-05 18:15 ` manu at gcc dot gnu dot org
2007-03-18 18:05 ` [Bug fortran/30929] -pedantic-error and -Werror don't produce errors! fxcoudert at gcc dot gnu dot org
2007-07-04 13:09 ` manu at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-03-05 18:15 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/30929] -pedantic-error and -Werror don't produce errors!
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-03-05 18:15 ` manu at gcc dot gnu dot org
@ 2007-03-18 18:05 ` fxcoudert at gcc dot gnu dot org
2007-07-04 13:09 ` manu at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-03-18 18:05 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-03-18 18:05:25
date| |
Summary|-pedantic-error produced |-pedantic-error and -Werror
|only warnings and no errors |don't produce errors!
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/30929] -pedantic-error and -Werror don't produce errors!
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-03-18 18:05 ` [Bug fortran/30929] -pedantic-error and -Werror don't produce errors! fxcoudert at gcc dot gnu dot org
@ 2007-07-04 13:09 ` manu at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-07-04 13:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from manu at gcc dot gnu dot org 2007-07-04 13:08 -------
(In reply to comment #4)
>
> No idea how to untangle -pedantic from -Wtabs or -Wampersand if
> -pedantic-errors has been given, but -Werror has not.
>
What gfortran should do is that if pedantic enables Wtabs, then the warnings
should be of the form:
if (pedantic && warn_tabs)
pedantic("whatever");
else if (warn_tabs)
warning("whatever");
pedantic() emits errors if -pedantic-errors, otherwise it emits warnings.
warning() emits errors if -Werror, otherwise it emits warnings.
I guess there would be similar functions in gfortran. (It would be great to
integrate the diagnostics machinery but making things work in a similar way is
already a step forward).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30929
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-07-04 13:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 21:20 [Bug fortran/30929] New: -pedantic-error produced only warnings and no errors burnus at gcc dot gnu dot org
2007-02-27 15:33 ` [Bug fortran/30929] " burnus at gcc dot gnu dot org
2007-02-27 23:33 ` burnus at gcc dot gnu dot org
2007-03-05 17:06 ` manu at gcc dot gnu dot org
2007-03-05 18:09 ` burnus at gcc dot gnu dot org
2007-03-05 18:15 ` manu at gcc dot gnu dot org
2007-03-18 18:05 ` [Bug fortran/30929] -pedantic-error and -Werror don't produce errors! fxcoudert at gcc dot gnu dot org
2007-07-04 13:09 ` manu at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).