Bug 21061 - gfortran ignores -Werror
Summary: gfortran ignores -Werror
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2005-04-16 19:13 UTC by Richard Biener
Modified: 2006-12-02 00:12 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-12-20 18:37:12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2005-04-16 19:13:44 UTC
Said option has no effect.
Comment 1 Andrew Pinski 2005-04-16 19:26:14 UTC
Confirmed.
Comment 2 Bernhard Reutner-Fischer 2006-05-18 09:28:23 UTC
[RFC][PATCH] is here:
http://gcc.gnu.org/ml/fortran/2006-04/msg00266.html
Comment 3 Bernhard Reutner-Fischer 2006-09-11 18:26:53 UTC
-pedantic-errors also has no effect. From a quick look, it does not occur in fortran/* at all and should probably be removed.

I'm preparing an updated patch to add proper -Werror support that emits 'Warning' for warnings and treats them as errors. The patch from #2 emitted the string 'Error' instead, so may not be appropriate.
Comment 4 patchapp@dberlin.org 2006-09-14 13:00:31 UTC
Subject: Bug number pr21061

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00551.html
Comment 5 Bernhard Reutner-Fischer 2006-11-05 14:57:34 UTC
Subject: Bug 21061

Author: aldot
Date: Sun Nov  5 14:57:24 2006
New Revision: 118501

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118501
Log:
2006-11-05  Bernhard Fischer  <aldot@gcc.gnu.org>

        PR fortran/21061
        * error.c (gfc_warning): If warnings_are_errors then treat
        warnings as errors with respect to the exit code.
        (gfc_notify_std): Ditto.
        (gfc_warning_now): Ditto.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/error.c

Comment 6 Daniel Franke 2006-12-02 00:12:39 UTC
Fixed on trunk, closing.
Comment 7 Bernhard Reutner-Fischer 2007-04-14 19:33:27 UTC
Subject: Bug 21061

Author: aldot
Date: Sat Apr 14 19:33:11 2007
New Revision: 123820

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123820
Log:
2007-04-14  Bernhard Fischer

	PR fortran/21061
	* gfortran.dg/warnings_are_errors_1.f90: New testcase.
	* gfortran.dg/warnings_are_errors_1.f: New testcase.

Added:
    trunk/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f
    trunk/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90
Modified:
    trunk/gcc/testsuite/ChangeLog