public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44054] New: Handle -Werror, -Werror=, -fdiagnostics-show-option
@ 2010-05-10 10:21 burnus at gcc dot gnu dot org
2010-05-10 10:31 ` [Bug fortran/44054] " burnus at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-05-10 10:21 UTC (permalink / raw)
To: gcc-bugs
The middle end now supports besides -Werror also -Werror=list, where
-Werror=<foo> implies -W<foo>. Additionally, the middle end also annotates via
-fdiagnostics-show-option (enabled by default) the messages with the
warning-flag name in parentheses:
-Wuninitialized (or, e.g.: -Wall)
foo.c:4:2: warning: 'j' is used uninitialized in this function
[-Wuninitialized]
-Wuninitialized -fno-diagnostics-show-option:
foo.c:4:2: warning: 'j' is used uninitialized in this function
-Werror=uninitialized (or, e.g.: -Werror -Wall)
foo.c:4:2: error: 'j' is used uninitialized in this function
[-Werror=uninitialized]
Expected:
a) -Werror caues gfortran to print "Error" rather than "Warning"; currently it
only changes the exit status code (and the total error count)
b) -f(no-)diagnostics-show-option is supported by printing the flag in
parenthesis after the warning
c) -Werror=<list> is supported.
--
Summary: Handle -Werror, -Werror=, -fdiagnostics-show-option
Product: gcc
Version: 4.6.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=44054
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/44054] Handle -Werror, -Werror=, -fdiagnostics-show-option
2010-05-10 10:21 [Bug fortran/44054] New: Handle -Werror, -Werror=, -fdiagnostics-show-option burnus at gcc dot gnu dot org
@ 2010-05-10 10:31 ` burnus at gcc dot gnu dot org
2010-05-10 16:58 ` dfranke at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-05-10 10:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2010-05-10 10:30 -------
-Werror= was added 2006 (
http://gcc.gnu.org/viewcvs?view=revision&revision=109907 ) and the
-fdiagnostics-show-option already exists since 2005
(http://gcc.gnu.org/viewcvs?view=revision&revision=99169 ) - though it has only
be enabled very recently, cf.
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00910.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44054
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/44054] Handle -Werror, -Werror=, -fdiagnostics-show-option
2010-05-10 10:21 [Bug fortran/44054] New: Handle -Werror, -Werror=, -fdiagnostics-show-option burnus at gcc dot gnu dot org
2010-05-10 10:31 ` [Bug fortran/44054] " burnus at gcc dot gnu dot org
@ 2010-05-10 16:58 ` dfranke at gcc dot gnu dot org
2010-05-10 17:17 ` burnus at gcc dot gnu dot org
2010-05-15 0:44 ` manu at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-10 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dfranke at gcc dot gnu dot org 2010-05-10 16:58 -------
This probably superseeds (accompanies?) PR31601.
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44054
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/44054] Handle -Werror, -Werror=, -fdiagnostics-show-option
2010-05-10 10:21 [Bug fortran/44054] New: Handle -Werror, -Werror=, -fdiagnostics-show-option burnus at gcc dot gnu dot org
2010-05-10 10:31 ` [Bug fortran/44054] " burnus at gcc dot gnu dot org
2010-05-10 16:58 ` dfranke at gcc dot gnu dot org
@ 2010-05-10 17:17 ` burnus at gcc dot gnu dot org
2010-05-15 0:44 ` manu at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-05-10 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2010-05-10 17:16 -------
(In reply to comment #2)
> This probably superseeds (accompanies?) PR31601.
Not really. This is about warnings - the other is about errors due to -std=.
For warnings, the purpose is to help fine-tuning the warnings - while for
errors (-std=, -f(no-)range-check) the idea is to point the user to an option,
which allows him/her to still compile the program.
(Sometimes one is simply not aware that a certain option exists - and
especially non-Fortran programmers tend to compile legacy Fortran programs. But
even I tend to forget about. e.g., -std=legacy or -fdollar-ok.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44054
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/44054] Handle -Werror, -Werror=, -fdiagnostics-show-option
2010-05-10 10:21 [Bug fortran/44054] New: Handle -Werror, -Werror=, -fdiagnostics-show-option burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-05-10 17:17 ` burnus at gcc dot gnu dot org
@ 2010-05-15 0:44 ` manu at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-05-15 0:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from manu at gcc dot gnu dot org 2010-05-15 00:44 -------
It would be so nice if there was a single diagnostics library that all FEs
could use and help to enhance. Something configurable, flexible and powerful
like LLVM's diagnostics library. Then Fortran could configure the library to
get a consistent output. Maybe pooling resources we could get caret
diagnostics, ranges, xml output, color, fix-it hints, spell-checker and a few
other features that LLVM already has.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-05-15 00:44:07
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44054
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-15 0:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 10:21 [Bug fortran/44054] New: Handle -Werror, -Werror=, -fdiagnostics-show-option burnus at gcc dot gnu dot org
2010-05-10 10:31 ` [Bug fortran/44054] " burnus at gcc dot gnu dot org
2010-05-10 16:58 ` dfranke at gcc dot gnu dot org
2010-05-10 17:17 ` burnus at gcc dot gnu dot org
2010-05-15 0:44 ` 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).