public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/24577]  New: diagnostic informative note labelled "error"
@ 2005-10-28 22:39 igodard at pacbell dot net
  2005-10-28 23:44 ` [Bug c/24577] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: igodard at pacbell dot net @ 2005-10-28 22:39 UTC (permalink / raw)
  To: gcc-bugs

void foo(){ int a = b; }

gets you:

foo.cc: In function `void foo()':
foo.cc:1: error: `b' undeclared (first use this function)
foo.cc:1: error: (Each undeclared identifier is reported only once for each
function it appears in.)

Other informative notes are labeled "note:". Because this is labelled "error",
scripts that scan generated compiler output to count errors get wrong counts.

Ivan


-- 
           Summary: diagnostic informative note labelled "error"
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
@ 2005-10-28 23:44 ` pinskia at gcc dot gnu dot org
  2005-10-28 23:44 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-28 23:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-10-28 23:44 -------
This is only a C bug now:
t.c:1: error: 'b' undeclared (first use in this function)
t.c:1: error: (Each undeclared identifier is reported only once
t.c:1: error: for each function it appears in.)

Confirmed, the C++ front-end now gives
t.c: In function 'void foo()':
t.c:1: error: 'b' was not declared in this scope


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |c
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-28 23:44:06
               date|                            |


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
  2005-10-28 23:44 ` [Bug c/24577] " pinskia at gcc dot gnu dot org
@ 2005-10-28 23:44 ` pinskia at gcc dot gnu dot org
  2007-01-26 15:35 ` manu at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-28 23:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |trivial


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
  2005-10-28 23:44 ` [Bug c/24577] " pinskia at gcc dot gnu dot org
  2005-10-28 23:44 ` pinskia at gcc dot gnu dot org
@ 2007-01-26 15:35 ` manu at gcc dot gnu dot org
  2007-01-31 23:38 ` manu at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-01-26 15:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from manu at gcc dot gnu dot org  2007-01-26 15:34 -------
So what is the correct solution? Use inform or notice? Or don't show the
message as C++ does?


-- 


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
                   ` (2 preceding siblings ...)
  2007-01-26 15:35 ` manu at gcc dot gnu dot org
@ 2007-01-31 23:38 ` manu at gcc dot gnu dot org
  2007-02-01  1:03 ` igodard at pacbell dot net
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-01-31 23:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from manu at gcc dot gnu dot org  2007-01-31 23:38 -------
(In reply to comment #0)
> 
> Other informative notes are labeled "note:". Because this is labelled "error",
> scripts that scan generated compiler output to count errors get wrong counts.
> 

Ivan, the fix is trivial. In c-decl.c (undeclared_variable), replace the call
to "error" with a call to "inform". However, it may require updating testcases
and the maintainers may prefer to remove the message altogether. Since this is
a minor issue, it is not strange that people prefer to do something else. 

If you are interested in seeing this fixed, this is a good opportunity to learn
how to contribute to GCC, since the patch is trivial, the only difficulty is
the whole process, that may seem complex at the beginning. You can find more
information in http://gcc.gnu.org/contribute.html and ask any question about
contributing in gcc@gcc.gnu.org.


-- 


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
                   ` (3 preceding siblings ...)
  2007-01-31 23:38 ` manu at gcc dot gnu dot org
@ 2007-02-01  1:03 ` igodard at pacbell dot net
  2010-02-26 16:57 ` manu at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: igodard at pacbell dot net @ 2007-02-01  1:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from igodard at pacbell dot net  2007-02-01 01:03 -------
My employer does not permit employees to contribute to open source projects due
to IP concerns. What's your second choice?


-- 


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
                   ` (4 preceding siblings ...)
  2007-02-01  1:03 ` igodard at pacbell dot net
@ 2010-02-26 16:57 ` manu at gcc dot gnu dot org
  2010-02-26 17:03 ` manu at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-26 16:57 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #5 from manu at gcc dot gnu dot org  2010-02-26 16:56 -------
Subject: Bug 24577

Author: manu
Date: Fri Feb 26 16:56:09 2010
New Revision: 157095

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157095
Log:
2010-02-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR c/24577
        * c-decl.c (undeclared_variable): Use an informative note.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-decl.c


-- 


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
                   ` (5 preceding siblings ...)
  2010-02-26 16:57 ` manu at gcc dot gnu dot org
@ 2010-02-26 17:03 ` manu at gcc dot gnu dot org
  2010-02-26 17:04 ` manu at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-26 17:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from manu at gcc dot gnu dot org  2010-02-26 17:03 -------
(In reply to comment #4)
> My employer does not permit employees to contribute to open source projects due
> to IP concerns. What's your second choice?

You could lobby your employer to change their policy. I am sure there are other
free software users in your company.

Or you can get paid support from Red Hat, Codesourcery or other GCC support
service, and ask them to fix the bugs for you.

Or you can wait until a friendly volunteer comes around and fixes it gratis for
you.


-- 


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
                   ` (7 preceding siblings ...)
  2010-02-26 17:04 ` manu at gcc dot gnu dot org
@ 2010-02-26 17:04 ` manu at gcc dot gnu dot org
  2010-02-27 17:49 ` manu at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-26 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from manu at gcc dot gnu dot org  2010-02-26 17:04 -------
Thanks for the report in any case. This will be FIXED in GCC 4.5


-- 


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
                   ` (6 preceding siblings ...)
  2010-02-26 17:03 ` manu at gcc dot gnu dot org
@ 2010-02-26 17:04 ` manu at gcc dot gnu dot org
  2010-02-26 17:04 ` manu at gcc dot gnu dot org
  2010-02-27 17:49 ` manu at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-26 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from manu at gcc dot gnu dot org  2010-02-26 17:03 -------
(In reply to comment #4)
> My employer does not permit employees to contribute to open source projects due
> to IP concerns. What's your second choice?

You could lobby your employer to change their policy. I am sure there are other
free software users in your company.

Or you can get paid support from Red Hat, Codesourcery or other GCC support
service, and ask them to fix the bugs for you.

Or you can wait until a friendly volunteer comes around and fixes it gratis for
you.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c/24577] diagnostic informative note labelled "error"
  2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
                   ` (8 preceding siblings ...)
  2010-02-26 17:04 ` manu at gcc dot gnu dot org
@ 2010-02-27 17:49 ` manu at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-27 17:49 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #9 from manu at gcc dot gnu dot org  2010-02-27 17:48 -------
Subject: Bug 24577

Author: manu
Date: Sat Feb 27 17:48:02 2010
New Revision: 157111

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157111
Log:
2010-02-27  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR c/24577
        PR c/43192
        * gcc.dg/pr8927-1.c: Match new note.
        * gcc.dg/990506-0.c: Likewise.
        * gcc.dg/gomp/flush-2.c: Likewise.
        * gcc.dg/gomp/atomic-5.c: Likewise.
        * gcc.dg/gomp/pr34607.c: Likewise.
        * gcc.dg/pr35746.c: Likewise.
        * gcc.dg/cpp/pragma-1.c: Likewise.
        * gcc.dg/cpp/pragma-2.c: Likewise.
        * gcc.dg/pr41842.c: Likewise.
        * gcc.dg/noncompile/20040629-1.c: Likewise.
        * objc.dg/private-1.m: Likewise.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/990506-0.c
    trunk/gcc/testsuite/gcc.dg/cpp/pragma-1.c
    trunk/gcc/testsuite/gcc.dg/cpp/pragma-2.c
    trunk/gcc/testsuite/gcc.dg/gomp/atomic-5.c
    trunk/gcc/testsuite/gcc.dg/gomp/flush-2.c
    trunk/gcc/testsuite/gcc.dg/gomp/pr34607.c
    trunk/gcc/testsuite/gcc.dg/noncompile/20040629-1.c
    trunk/gcc/testsuite/gcc.dg/pr35746.c
    trunk/gcc/testsuite/gcc.dg/pr41842.c
    trunk/gcc/testsuite/gcc.dg/pr8927-1.c
    trunk/gcc/testsuite/objc.dg/private-1.m


-- 


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


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

end of thread, other threads:[~2010-02-27 17:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-28 22:39 [Bug c++/24577] New: diagnostic informative note labelled "error" igodard at pacbell dot net
2005-10-28 23:44 ` [Bug c/24577] " pinskia at gcc dot gnu dot org
2005-10-28 23:44 ` pinskia at gcc dot gnu dot org
2007-01-26 15:35 ` manu at gcc dot gnu dot org
2007-01-31 23:38 ` manu at gcc dot gnu dot org
2007-02-01  1:03 ` igodard at pacbell dot net
2010-02-26 16:57 ` manu at gcc dot gnu dot org
2010-02-26 17:03 ` manu at gcc dot gnu dot org
2010-02-26 17:04 ` manu at gcc dot gnu dot org
2010-02-26 17:04 ` manu at gcc dot gnu dot org
2010-02-27 17:49 ` 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).