public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30824]  New: -Werror -Wfatal-errors should stop after the first warning
@ 2007-02-16 15:58 manu at gcc dot gnu dot org
  2007-02-16 15:59 ` [Bug c/30824] " manu at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-02-16 15:58 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

Testcase:

void f(int c)
{
  return c;
}

int g(int c)
{
  return;
}

~$ gcc -Wreturn-type -c test.c -Werror -Wfatal-errors
cc1: warnings being treated as errors
test.c: In function ‘f’:
test.c:3: warning: ‘return’ with a value, in function returning void
test.c: In function ‘g’:
test.c:8: warning: ‘return’ with no value, in function returning non-void

If should have stopped after the first warning.


-- 
           Summary: -Werror -Wfatal-errors should stop after the first
                    warning
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: manu at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30824


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/30824] -Werror -Wfatal-errors should stop after the first warning
  2007-02-16 15:58 [Bug c/30824] New: -Werror -Wfatal-errors should stop after the first warning manu at gcc dot gnu dot org
@ 2007-02-16 15:59 ` manu at gcc dot gnu dot org
  2007-02-19 19:55 ` [Bug other/30824] " patchapp at dberlin dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-02-16 15:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from manu at gcc dot gnu dot org  2007-02-16 15:59 -------
> If should have stopped after the first warning.

I meant "It should have".



-- 

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=30824


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug other/30824] -Werror -Wfatal-errors should stop after the first warning
  2007-02-16 15:58 [Bug c/30824] New: -Werror -Wfatal-errors should stop after the first warning manu at gcc dot gnu dot org
  2007-02-16 15:59 ` [Bug c/30824] " manu at gcc dot gnu dot org
@ 2007-02-19 19:55 ` patchapp at dberlin dot org
  2007-02-20 10:19 ` manu at gcc dot gnu dot org
  2007-02-20 10:45 ` manu at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: patchapp at dberlin dot org @ 2007-02-19 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from patchapp at dberlin dot org  2007-02-19 19:55 -------
Subject: Bug number PR 30824

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/2007-02/msg01640.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30824


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug other/30824] -Werror -Wfatal-errors should stop after the first warning
  2007-02-16 15:58 [Bug c/30824] New: -Werror -Wfatal-errors should stop after the first warning manu at gcc dot gnu dot org
  2007-02-16 15:59 ` [Bug c/30824] " manu at gcc dot gnu dot org
  2007-02-19 19:55 ` [Bug other/30824] " patchapp at dberlin dot org
@ 2007-02-20 10:19 ` manu at gcc dot gnu dot org
  2007-02-20 10:45 ` manu at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-02-20 10:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from manu at gcc dot gnu dot org  2007-02-20 10:19 -------
Subject: Bug 30824

Author: manu
Date: Tue Feb 20 10:18:58 2007
New Revision: 122159

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122159
Log:
2007-02-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
            DJ Delorie <dj@redhat.com>

        PR other/30824
        * diagnostic.c (diagnostic_count_diagnostic): Move -Werror
        logic to...
        (diagnostic_report_diagnostic): ... here, and turn them into
        real errors. If warnings are inhibited, no need to do
        anything.

testsuite/
        * gcc.dg/Wfatal.c: New.
        * gcc.dg/Wfatal-2.c: New.
        * gcc.dg/Werror-1.c: Adjust expectations.
        * gcc.dg/Werror-5.c: Likewise.
        * gcc.dg/Werror-7.c: Likewise.
        * gcc.dg/Werror-10.c: Likewise.
        * gcc.dg/Werror-11.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.dg/Wfatal-2.c
    trunk/gcc/testsuite/gcc.dg/Wfatal.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/diagnostic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/Werror-1.c
    trunk/gcc/testsuite/gcc.dg/Werror-10.c
    trunk/gcc/testsuite/gcc.dg/Werror-11.c
    trunk/gcc/testsuite/gcc.dg/Werror-5.c
    trunk/gcc/testsuite/gcc.dg/Werror-7.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30824


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug other/30824] -Werror -Wfatal-errors should stop after the first warning
  2007-02-16 15:58 [Bug c/30824] New: -Werror -Wfatal-errors should stop after the first warning manu at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-02-20 10:19 ` manu at gcc dot gnu dot org
@ 2007-02-20 10:45 ` manu at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-02-20 10:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from manu at gcc dot gnu dot org  2007-02-20 10:45 -------
Fixed in GCC 4.3


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30824


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-20 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16 15:58 [Bug c/30824] New: -Werror -Wfatal-errors should stop after the first warning manu at gcc dot gnu dot org
2007-02-16 15:59 ` [Bug c/30824] " manu at gcc dot gnu dot org
2007-02-19 19:55 ` [Bug other/30824] " patchapp at dberlin dot org
2007-02-20 10:19 ` manu at gcc dot gnu dot org
2007-02-20 10:45 ` 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).