public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12272] New: Doesn't find namespace
@ 2003-09-14 2:53 igodard at pacbell dot net
2003-09-14 2:55 ` [Bug c++/12272] " igodard at pacbell dot net
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: igodard at pacbell dot net @ 2003-09-14 2:53 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=12272
Summary: Doesn't find namespace
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] Doesn't find namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
@ 2003-09-14 2:55 ` igodard at pacbell dot net
2003-09-14 4:03 ` igodard at pacbell dot net
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: igodard at pacbell dot net @ 2003-09-14 2:55 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=12272
------- Additional Comments From igodard at pacbell dot net 2003-09-14 02:08 -------
Created an attachment (id=4753)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4753&action=view)
Compiler output (-v -save-temps)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] Doesn't find namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
2003-09-14 2:55 ` [Bug c++/12272] " igodard at pacbell dot net
@ 2003-09-14 4:03 ` igodard at pacbell dot net
2003-09-14 5:27 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: igodard at pacbell dot net @ 2003-09-14 4:03 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=12272
------- Additional Comments From igodard at pacbell dot net 2003-09-14 02:10 -------
Created an attachment (id=4754)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4754&action=view)
Source code (-save-temps)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] Doesn't find namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
2003-09-14 2:55 ` [Bug c++/12272] " igodard at pacbell dot net
2003-09-14 4:03 ` igodard at pacbell dot net
@ 2003-09-14 5:27 ` pinskia at gcc dot gnu dot org
2003-09-15 0:23 ` [Bug c++/12272] using declaration shadows namespace bangerth at dealii dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-14 5: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=12272
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-14 04:03 -------
A work around is to add :: in front of Hide in those two lines.
I tried to reduce it but it was hard.
Also note not all the code is standard compliant and cannot compile on 3.4, I had to add
template<> in front of specifications.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (2 preceding siblings ...)
2003-09-14 5:27 ` pinskia at gcc dot gnu dot org
@ 2003-09-15 0:23 ` bangerth at dealii dot org
2003-09-15 0:45 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2003-09-15 0:23 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=12272
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Doesn't find namespace |using declaration shadows
| |namespace
------- Additional Comments From bangerth at dealii dot org 2003-09-15 00:13 -------
Here's a cut-down testcase:
----------------------------------------------
namespace NS1 {
namespace NS2 {
};
}
namespace NS2 {
class X;
}
using namespace NS1;
typedef NS2::X Y;
--------------------------------
It fails like so with 3.3:
tmp/g> ~/bin/gcc-3.3/bin/c++ -c x.cc
x.cc:10: error: syntax error before `::' token
I think it should pass. I'm at a machine where I don't have my compiler collection, so
I can't say whether this is a regression or what.
W.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (3 preceding siblings ...)
2003-09-15 0:23 ` [Bug c++/12272] using declaration shadows namespace bangerth at dealii dot org
@ 2003-09-15 0:45 ` pinskia at gcc dot gnu dot org
2003-09-15 1:50 ` gdr at integrable-solutions dot net
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-15 0:45 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=12272
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-15 00:23 -------
With ICC 6.0, I get an error:
pr12272.cc
pr12272.cc(10): error: "NS2" is ambiguous
typedef NS2::X Y;
^
compilation aborted for pr12272.cc (code 2)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (4 preceding siblings ...)
2003-09-15 0:45 ` pinskia at gcc dot gnu dot org
@ 2003-09-15 1:50 ` gdr at integrable-solutions dot net
2003-09-15 2:29 ` [Bug c++/12272] wrong error message " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-09-15 1:50 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=12272
------- Additional Comments From gdr at integrable-solutions dot net 2003-09-15 01:39 -------
Subject: Re: using declaration shadows namespace
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Here's a cut-down testcase:
| ----------------------------------------------
| namespace NS1 {
| namespace NS2 {
| };
| }
| namespace NS2 {
| class X;
| }
| using namespace NS1;
|
| typedef NS2::X Y;
^^^
"NS2" is ambiguous: NS1::NS2 or ::NS2?
| --------------------------------
|
| It fails like so with 3.3:
| tmp/g> ~/bin/gcc-3.3/bin/c++ -c x.cc
| x.cc:10: error: syntax error before `::' token
bogus diagnostic message.
| I think it should pass.
No, it should not. But the diagnostic message is close to useless.
-- Gaby
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] wrong error message using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (5 preceding siblings ...)
2003-09-15 1:50 ` gdr at integrable-solutions dot net
@ 2003-09-15 2:29 ` pinskia at gcc dot gnu dot org
2003-09-15 2:42 ` gdr at integrable-solutions dot net
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-15 2: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=12272
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2003-09-15 01:45:34
date| |
Summary|using declaration shadows |wrong error message using
|namespace |declaration shadows
| |namespace
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-15 01:45 -------
The mainline is even worse because NS2 is definitely a namespace:
pr12272.cc:10: error: `NS2' is not a class-name or namespace-name
pr12272.cc:10: error: expected init-declarator
pr12272.cc:10: error: expected `,' or `;'
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] wrong error message using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (6 preceding siblings ...)
2003-09-15 2:29 ` [Bug c++/12272] wrong error message " pinskia at gcc dot gnu dot org
@ 2003-09-15 2:42 ` gdr at integrable-solutions dot net
2003-09-15 14:48 ` bangerth at dealii dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-09-15 2:42 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=12272
------- Additional Comments From gdr at integrable-solutions dot net 2003-09-15 01:50 -------
Subject: Re: wrong error message using declaration shadows namespace
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| The mainline is even worse because NS2 is definitely a namespace:
| pr12272.cc:10: error: `NS2' is not a class-name or namespace-name
Arrgh. The cc1plus is horrifying ;-)
-- Gaby
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] wrong error message using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (7 preceding siblings ...)
2003-09-15 2:42 ` gdr at integrable-solutions dot net
@ 2003-09-15 14:48 ` bangerth at dealii dot org
2003-12-29 0:10 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2003-09-15 14:48 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=12272
------- Additional Comments From bangerth at dealii dot org 2003-09-15 14:04 -------
Thinking about it, y'all are right, of course, the code should
be invalid. One shouldn't do things in a hurry (but at least
we now have a small testcase).
W.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] wrong error message using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (8 preceding siblings ...)
2003-09-15 14:48 ` bangerth at dealii dot org
@ 2003-12-29 0:10 ` pinskia at gcc dot gnu dot org
2004-06-01 15:19 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-29 0:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-28 23:08 -------
Now I get this error which is not better.
pr12272.cc:10: error: `NS2' has not been declared
pr12272.cc:10: error: expected init-declarator before "Y"
pr12272.cc:10: error: expected `,' or `;' before "Y"
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-12-06 08:25:24 |2003-12-28 23:08:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12272
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] wrong error message using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (9 preceding siblings ...)
2003-12-29 0:10 ` pinskia at gcc dot gnu dot org
@ 2004-06-01 15:19 ` pinskia at gcc dot gnu dot org
2005-09-11 1:51 ` bangerth at dealii dot org
2005-09-23 13:22 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-01 15:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-01 15:19 -------
An almost dup of bug 100.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |100
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12272
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] wrong error message using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (10 preceding siblings ...)
2004-06-01 15:19 ` pinskia at gcc dot gnu dot org
@ 2005-09-11 1:51 ` bangerth at dealii dot org
2005-09-23 13:22 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2005-09-11 1:51 UTC (permalink / raw)
To: gcc-bugs
--
Bug 12272 depends on bug 100, which changed state.
Bug 100 Summary: confusing name lookup diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=100
What |Old Value |New Value
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12272
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/12272] wrong error message using declaration shadows namespace
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
` (11 preceding siblings ...)
2005-09-11 1:51 ` bangerth at dealii dot org
@ 2005-09-23 13:22 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-23 13:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-23 13:22 -------
*** Bug 23967 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jens dot maurer at gmx dot
| |net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12272
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-09-23 13:22 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-14 2:53 [Bug c++/12272] New: Doesn't find namespace igodard at pacbell dot net
2003-09-14 2:55 ` [Bug c++/12272] " igodard at pacbell dot net
2003-09-14 4:03 ` igodard at pacbell dot net
2003-09-14 5:27 ` pinskia at gcc dot gnu dot org
2003-09-15 0:23 ` [Bug c++/12272] using declaration shadows namespace bangerth at dealii dot org
2003-09-15 0:45 ` pinskia at gcc dot gnu dot org
2003-09-15 1:50 ` gdr at integrable-solutions dot net
2003-09-15 2:29 ` [Bug c++/12272] wrong error message " pinskia at gcc dot gnu dot org
2003-09-15 2:42 ` gdr at integrable-solutions dot net
2003-09-15 14:48 ` bangerth at dealii dot org
2003-12-29 0:10 ` pinskia at gcc dot gnu dot org
2004-06-01 15:19 ` pinskia at gcc dot gnu dot org
2005-09-11 1:51 ` bangerth at dealii dot org
2005-09-23 13:22 ` pinskia 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).