public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17609] New: spurious error message after using keyword
@ 2004-09-22 12:45 papadopo at shfj dot cea dot fr
  2004-09-22 13:00 ` [Bug c++/17609] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: papadopo at shfj dot cea dot fr @ 2004-09-22 12:45 UTC (permalink / raw)
  To: gcc-bugs

The 3.4 C++ compiler emits two errors on the following code. Only the first one
should be emitted (that's the case with gcc 3.3). That's not a serious bug since
the second error message disappears when the first one is fixed, but it's
disturbing nevertheless.

$ cat > foo.cc
#include <iostream>
void function1() {
    cout;
}
using namespace std;
void function2() {
    cout;
}
$ 
$ g++ -c foo.cc
foo.cc: In function `void function1()':
foo.cc:3: error: `cout' undeclared (first use this function)
foo.cc:3: error: (Each undeclared identifier is reported only once for each
function it appears in.)
foo.cc: In function `void function2()':
foo.cc:7: error: `cout' undeclared (first use this function)
$

-- 
           Summary: spurious error message after using keyword
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: papadopo at shfj dot cea dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
@ 2004-09-22 13:00 ` pinskia at gcc dot gnu dot org
  2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-22 13:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-22 13:00 -------
Confirmed, a 3.4 regression only.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
      Known to fail|                            |3.4.0
      Known to work|                            |3.3.3 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-22 13:00:09
               date|                            |
            Summary|spurious error message after|[3.4 Regression] spurious
                   |using keyword               |error message after using
                   |                            |keyword
   Target Milestone|---                         |3.4.3


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
  2004-09-22 13:00 ` [Bug c++/17609] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
  2005-05-19 17:30 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01  0:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-01 00:46 -------
Postponed until GCC 3.4.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.3                       |3.4.4


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
  2004-09-22 13:00 ` [Bug c++/17609] [3.4 Regression] " pinskia at gcc dot gnu dot org
  2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
@ 2005-05-19 17:30 ` mmitchel at gcc dot gnu dot org
  2005-09-19 15:46 ` reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:30 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.4                       |3.4.5


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
                   ` (2 preceding siblings ...)
  2005-05-19 17:30 ` mmitchel at gcc dot gnu dot org
@ 2005-09-19 15:46 ` reichelt at gcc dot gnu dot org
  2005-09-21 15:08 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-19 15:46 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |reichelt at gcc dot gnu dot
                   |dot org                     |org
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |09/msg01161.html
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
                   ` (3 preceding siblings ...)
  2005-09-19 15:46 ` reichelt at gcc dot gnu dot org
@ 2005-09-21 15:08 ` cvs-commit at gcc dot gnu dot org
  2005-09-21 15:12 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-21 15:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-21 15:08 -------
Subject: Bug 17609

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	reichelt@gcc.gnu.org	2005-09-21 15:08:00

Modified files:
	gcc/cp         : ChangeLog lex.c name-lookup.c name-lookup.h 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/lookup: ambig4.C koenig1.C 
	                             used-before-declaration.C 
	gcc/testsuite/g++.dg/ext: stmtexpr4.C 
	gcc/testsuite/g++.dg/other: do1.C 
	gcc/testsuite/g++.dg/overload: koenig1.C 
	gcc/testsuite/g++.dg/parse: crash13.C error21.C 
Added files:
	gcc/testsuite/g++.dg/lookup: error1.C 

Log message:
	PR c++/17609
	Backport:
	2004-03-08  Mark Mitchell  <mark@codesourcery.com>
	* lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
	in the innermost scope, rather than at namespace scope.
	* name-lookup.c (push_local_binding): Give it external linkage.
	* name-lookup.h (push_local_binding): Declare it.
	
	* g++.dg/lookup/error1.C: New test.
	* g++.dg/lookup/ambig4.C: Tweak error messages.
	* g++.dg/ext/stmtexpr4.C: Likewise.
	* g++.dg/parse/error21.C: Tweak testcase.
	
	Backport:
	2004-03-02  Mark Mitchell  <mark@codesourcery.com>
	* g++.dg/lookup/koenig1.C: Tweak error messages.
	* g++.dg/lookup/used-before-declaration.C: Likewise.
	* g++.dg/other/do1.C: Likewise.
	* g++.dg/overload/koenig1.C: Likewise.
	* g++.dg/parse/crash13.C: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.242&r2=1.3892.2.243
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/lex.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.323.2.4&r2=1.323.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.34.2.24&r2=1.34.2.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.15.2.3&r2=1.15.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.436&r2=1.3389.2.437
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/error1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/ambig4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.6.1&r2=1.1.6.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/koenig1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.22.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/used-before-declaration.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/stmtexpr4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.4.1&r2=1.1.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/do1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3&r2=1.3.20.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/overload/koenig1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.24.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash13.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.14.1&r2=1.1.14.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error21.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.2.1&r2=1.1.2.2



-- 


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
                   ` (4 preceding siblings ...)
  2005-09-21 15:08 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-21 15:12 ` reichelt at gcc dot gnu dot org
  2005-09-21 15:22 ` cvs-commit at gcc dot gnu dot org
  2005-09-21 15:23 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-21 15:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-09-21 15:12 -------
This is now fixed in GCC 3.4.5.

The new testcase g++.dg/lookup/error1.C will be added to mainline
and the 4.0 branch. In the meantime I'll keep the PR open.


-- 


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
                   ` (5 preceding siblings ...)
  2005-09-21 15:12 ` reichelt at gcc dot gnu dot org
@ 2005-09-21 15:22 ` cvs-commit at gcc dot gnu dot org
  2005-09-21 15:23 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-21 15:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-21 15:21 -------
Subject: Bug 17609

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	reichelt@gcc.gnu.org	2005-09-21 15:21:00

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/lookup: error1.C 

Log message:
	PR c++/17609
	* g++.dg/lookup/error1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6090&r2=1.6091
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/error1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
  2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
                   ` (6 preceding siblings ...)
  2005-09-21 15:22 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-21 15:23 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-21 15:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-09-21 15:23 -------
Testcase now also in mainline.
Waiting for 4.0 branch to unfreeze.


-- 


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
       [not found] <bug-17609-469@http.gcc.gnu.org/bugzilla/>
  2005-10-05 15:36 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-05 15:37 ` reichelt at gcc dot gnu dot org
  1 sibling, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-10-05 15:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from reichelt at gcc dot gnu dot org  2005-10-05 15:37 -------
Testcase now also on the 4.0 branch.


-- 

reichelt at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/17609] [3.4 Regression] spurious error message after using keyword
       [not found] <bug-17609-469@http.gcc.gnu.org/bugzilla/>
@ 2005-10-05 15:36 ` cvs-commit at gcc dot gnu dot org
  2005-10-05 15:37 ` reichelt at gcc dot gnu dot org
  1 sibling, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-05 15:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from cvs-commit at gcc dot gnu dot org  2005-10-05 15:36 -------
Subject: Bug 17609

CVSROOT:        /cvs/gcc
Module name:    gcc
Branch:         gcc-4_0-branch
Changes by:     reichelt@gcc.gnu.org    2005-10-05 15:36:28

Modified files:
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/lookup: error1.C 

Log message:
        PR c++/17609
        * g++.dg/lookup/error1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.429&r2=1.5084.2.430
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/error1.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.2.10.1


-- 


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


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

end of thread, other threads:[~2005-10-05 15:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 12:45 [Bug c++/17609] New: spurious error message after using keyword papadopo at shfj dot cea dot fr
2004-09-22 13:00 ` [Bug c++/17609] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
2005-05-19 17:30 ` mmitchel at gcc dot gnu dot org
2005-09-19 15:46 ` reichelt at gcc dot gnu dot org
2005-09-21 15:08 ` cvs-commit at gcc dot gnu dot org
2005-09-21 15:12 ` reichelt at gcc dot gnu dot org
2005-09-21 15:22 ` cvs-commit at gcc dot gnu dot org
2005-09-21 15:23 ` reichelt at gcc dot gnu dot org
     [not found] <bug-17609-469@http.gcc.gnu.org/bugzilla/>
2005-10-05 15:36 ` cvs-commit at gcc dot gnu dot org
2005-10-05 15:37 ` reichelt 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).