public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3
@ 2003-07-12 16:13 kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:14 ` [Bug c++/11507] " kai-gcc-bugs at khms dot westfalen dot de
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: kai-gcc-bugs at khms dot westfalen dot de @ 2003-07-12 16:13 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
Summary: parser fails to recognize namespace; regression to 3.3
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kai-gcc-bugs at khms dot westfalen dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
This fails both on HEAD and on tree-ssa, but works on this version:
Reading specs from /usr/lib/gcc-lib/i386-linux/3.3.1/specs
Konfiguriert mit: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i386-linux
Thread model: posix
gcc-Version 3.3.1 20030626 (Debian prerelease)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] parser fails to recognize namespace; regression to 3.3
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
@ 2003-07-12 16:14 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:15 ` kai-gcc-bugs at khms dot westfalen dot de
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: kai-gcc-bugs at khms dot westfalen dot de @ 2003-07-12 16:14 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From kai-gcc-bugs at khms dot westfalen dot de 2003-07-12 16:14 -------
Created an attachment (id=4393)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4393&action=view)
error output with HEAD
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] parser fails to recognize namespace; regression to 3.3
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:14 ` [Bug c++/11507] " kai-gcc-bugs at khms dot westfalen dot de
@ 2003-07-12 16:15 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:17 ` kai-gcc-bugs at khms dot westfalen dot de
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: kai-gcc-bugs at khms dot westfalen dot de @ 2003-07-12 16:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From kai-gcc-bugs at khms dot westfalen dot de 2003-07-12 16:15 -------
Created an attachment (id=4394)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4394&action=view)
also happens with this version of tree-ssa
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] parser fails to recognize namespace; regression to 3.3
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:14 ` [Bug c++/11507] " kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:15 ` kai-gcc-bugs at khms dot westfalen dot de
@ 2003-07-12 16:17 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:25 ` kai-gcc-bugs at khms dot westfalen dot de
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: kai-gcc-bugs at khms dot westfalen dot de @ 2003-07-12 16:17 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From kai-gcc-bugs at khms dot westfalen dot de 2003-07-12 16:17 -------
Created an attachment (id=4395)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4395&action=view)
input (.ii)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] parser fails to recognize namespace; regression to 3.3
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (2 preceding siblings ...)
2003-07-12 16:17 ` kai-gcc-bugs at khms dot westfalen dot de
@ 2003-07-12 16:25 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 18:27 ` kai-gcc-bugs at khms dot westfalen dot de
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: kai-gcc-bugs at khms dot westfalen dot de @ 2003-07-12 16:25 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From kai-gcc-bugs at khms dot westfalen dot de 2003-07-12 16:25 -------
Created an attachment (id=4396)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4396&action=view)
Just in case it matters: diff to .ii from 3.3.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] parser fails to recognize namespace; regression to 3.3
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (3 preceding siblings ...)
2003-07-12 16:25 ` kai-gcc-bugs at khms dot westfalen dot de
@ 2003-07-12 18:27 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 19:29 ` [Bug c++/11507] [3.4 regression]parser " neroden at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: kai-gcc-bugs at khms dot westfalen dot de @ 2003-07-12 18:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From kai-gcc-bugs at khms dot westfalen dot de 2003-07-12 18:27 -------
Just in case you're curious what on earth this is trying to do:
It's a C++ wrapper for curses, which tries to be namespace clean by first
importing all the definitions into a special encapsulation namespace, then
(essentially) using the .ii file generated from this as a header file and
implementing another final encapsulation.
Very approximately, and with some detail left out,
namespace n1 {
#include ...
encap_function() { return function(); }
}
#include "previous.ii"
namespace n2 {
function() { n1::encap_function(); }
}
In the end, inlining should leave just the bare references to the C library
functions. So far, this seems to work perfectly (except for this bug, when I
wanted to see some C-syntax tree dumps, and know if there were bugs the old
parser didn't catch, and tried HEAD and tree-ssa on my source.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] [3.4 regression]parser fails to recognize namespace; regression to 3.3
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (4 preceding siblings ...)
2003-07-12 18:27 ` kai-gcc-bugs at khms dot westfalen dot de
@ 2003-07-12 19:29 ` neroden at gcc dot gnu dot org
2003-07-12 20:29 ` pinskia at physics dot uc dot edu
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-07-12 19:29 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
neroden at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Summary|parser fails to recognize |[3.4 regression]parser fails
|namespace; regression to 3.3|to recognize namespace;
| |regression to 3.3
------- Additional Comments From neroden at gcc dot gnu dot org 2003-07-12 19:29 -------
tagging, but I'm not actually sure whether it's legal code or not, as usual with C++, so not confirming.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] [3.4 regression]parser fails to recognize namespace; regression to 3.3
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (5 preceding siblings ...)
2003-07-12 19:29 ` [Bug c++/11507] [3.4 regression]parser " neroden at gcc dot gnu dot org
@ 2003-07-12 20:29 ` pinskia at physics dot uc dot edu
2003-07-12 23:41 ` [Bug c++/11507] [3.4 regression] parser fails to recognize namespace bangerth at dealii dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-12 20:29 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-12 20:29 -------
I do not think what you are doing is valid as if the headers include standard c++ headers
(really the deprecated ones from the C standard which define stuff in the namespace std
and have "using namespace ::std;") then the some of the namespace std is inside the
wrong namespace.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] [3.4 regression] parser fails to recognize namespace
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (6 preceding siblings ...)
2003-07-12 20:29 ` pinskia at physics dot uc dot edu
@ 2003-07-12 23:41 ` bangerth at dealii dot org
2003-07-15 14:59 ` pinskia at physics dot uc dot edu
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2003-07-12 23:41 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-07-12 23:41:20
date| |
Summary|[3.4 regression]parser fails|[3.4 regression] parser
|to recognize namespace; |fails to recognize namespace
|regression to 3.3 |
------- Additional Comments From bangerth at dealii dot org 2003-07-12 23:41 -------
I don't think you technique is something I would recommend, but there is still
a bug in gcc :-)
Here's a cut-down testcase:
------------------------
namespace NS
{
void foo(bool arg1);
}
namespace M {
namespace K {
bool Bc(bool x);
}
void bar() {
NS::foo (K::Bc(true));
};
}
--------------------------
This is used to compile with 3.3, but now fails like so:
tmp/gg> ../build-gcc/gcc-install/bin/c++ -c x.cc
x.cc: In function `void M::bar()':
x.cc:12: error: `K' is not a class-name or namespace-name
x.cc:12: error: `Bc' undeclared (first use this function)
x.cc:12: error: (Each undeclared identifier is reported only once for each
function it appears in.)
I think gcc is wrong. icc agress with me.
W.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] [3.4 regression] parser fails to recognize namespace
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (7 preceding siblings ...)
2003-07-12 23:41 ` [Bug c++/11507] [3.4 regression] parser fails to recognize namespace bangerth at dealii dot org
@ 2003-07-15 14:59 ` pinskia at physics dot uc dot edu
2003-07-18 1:25 ` pinskia at physics dot uc dot edu
2003-09-07 3:43 ` cvs-commit at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-15 14:59 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-15 14:59 -------
Using the small testcase and Phil's regression hunter (2002-12-27-trunk (#177) and
2002-12-28-trunk (#178)), this looks like it was introduced with the new parser.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] [3.4 regression] parser fails to recognize namespace
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (8 preceding siblings ...)
2003-07-15 14:59 ` pinskia at physics dot uc dot edu
@ 2003-07-18 1:25 ` pinskia at physics dot uc dot edu
2003-09-07 3:43 ` cvs-commit at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-18 1:25 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-18 01:25 -------
Fixed on the mainline (20030717). I will submit a test case.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/11507] [3.4 regression] parser fails to recognize namespace
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
` (9 preceding siblings ...)
2003-07-18 1:25 ` pinskia at physics dot uc dot edu
@ 2003-09-07 3:43 ` cvs-commit at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-07 3:43 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11507
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-09-07 03:43 -------
Subject: Bug 11507
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2003-09-07 03:43:15
Added files:
gcc/testsuite/g++.dg/lookup: scoped7.C
gcc/testsuite/g++.dg/other: static1.C
gcc/testsuite/g++.dg/warn: template-1.C
gcc/testsuite/g++.dg/template: crash10.C call1.C
gcc/testsuite/g++.dg/overload: VLA.C
Log message:
2003-09-06 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/11507
* g++.dg/lookup/scoped7.C: New test.
PR c++/9574
* g++.dg/other/static1.C: New test.
PR c++/11490
* g++.dg/warn/template-1.C: New test.
PR c++/11432
* g++.dg/template/crash10.C: New test.
PR c++/2478
* g++.dg/overload/VLA.C: New test.
PR c++/10804
* g++.dg/template/call1.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/scoped7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/static1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/template-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash10.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/call1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/overload/VLA.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-09-07 3:43 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-12 16:13 [Bug c++/11507] New: parser fails to recognize namespace; regression to 3.3 kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:14 ` [Bug c++/11507] " kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:15 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:17 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 16:25 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 18:27 ` kai-gcc-bugs at khms dot westfalen dot de
2003-07-12 19:29 ` [Bug c++/11507] [3.4 regression]parser " neroden at gcc dot gnu dot org
2003-07-12 20:29 ` pinskia at physics dot uc dot edu
2003-07-12 23:41 ` [Bug c++/11507] [3.4 regression] parser fails to recognize namespace bangerth at dealii dot org
2003-07-15 14:59 ` pinskia at physics dot uc dot edu
2003-07-18 1:25 ` pinskia at physics dot uc dot edu
2003-09-07 3:43 ` cvs-commit 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).