* [Bug c++/25980] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
@ 2006-01-26 18:49 ` pinskia at gcc dot gnu dot org
2006-01-26 18:56 ` gdr at cs dot tamu dot edu
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-26 18:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-26 18:49 -------
I think you (and EDG) are missing what argument dependent lookup does for this
case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/25980] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
2006-01-26 18:49 ` [Bug c++/25980] " pinskia at gcc dot gnu dot org
@ 2006-01-26 18:56 ` gdr at cs dot tamu dot edu
2006-01-26 20:27 ` dwhorton at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: gdr at cs dot tamu dot edu @ 2006-01-26 18:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from gdr at cs dot tamu dot edu 2006-01-26 18:56 -------
Subject: Re: New: Unexpected name conflict between symbols
"dwhorton at gmail dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| The following fails to compile, it would appear that symbols from seperate
| namespaces are colliding in error:
|
| [dhorton@dev228 tmp]$ cat test2.cpp
| namespace ns1 {
| class c {};
| typedef int f;
|
| static c x;
| }
|
| namespace ns2 {
| void f(ns1::c& cc)
| {
| }
|
| void g()
| {
| f(ns1::x);
| }
| }
[...]
| test2.cpp: In function `void ns2::g()':
| test2.cpp:3: error: `ns1::f' is not a function,
| test2.cpp:10: error: conflict with `void ns2::f(ns1::c&)'
| test2.cpp:15: error: in call to `f'
| [dhorton@dev228 tmp]$
| [dhorton@dev228 tmp]$ cat test2.*i*
| # 1 "test2.cpp"
| # 1 "<built-in>"
| # 1 "<command line>"
| # 1 "test2.cpp"
| namespace ns1 {
| class c {};
| typedef int f;
|
| static c x;
| }
|
| namespace ns2 {
| void f(ns1::c& cc)
| {
| }
|
| void g()
| {
| f(ns1::x);
| }
| }
| [dhorton@dev228 tmp]$
|
| I don't see why symbols ns1::f and ns2::f are in conflict here, as when f()
in
| ns2::g is being resolved ns1::f should not be visible, should it?
This is a known issue. Name lookup apply uniformly. In particular,
ADL finds in this case both function and non-function.
Since we don't have (yet) overload set that can include functions and
non-functions, the program is ill-formed. See Core Issue 218
http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_active.html#218
Notice that the last note was quite a long time ago -- before C++03
and now we're in the "extensions" timeframe. There is strong feeling
that name lookup should apply uniformly, and we should also have
overload resolution with function objects included.
I believe there alreay is a PR for this. The proper action is to
suspend it until the issue is completely resolved.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/25980] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
2006-01-26 18:49 ` [Bug c++/25980] " pinskia at gcc dot gnu dot org
2006-01-26 18:56 ` gdr at cs dot tamu dot edu
@ 2006-01-26 20:27 ` dwhorton at gmail dot com
2006-01-28 20:49 ` [Bug c++/25980] [DR 218] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dwhorton at gmail dot com @ 2006-01-26 20:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dwhorton at gmail dot com 2006-01-26 20:27 -------
I see the issue. I am surprised that ADL causes non-functions from one
namespace to pollute another. Nonetheless given the present state of the spec
the confict as reported seems to be valid behaviour.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/25980] [DR 218] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
` (2 preceding siblings ...)
2006-01-26 20:27 ` dwhorton at gmail dot com
@ 2006-01-28 20:49 ` pinskia at gcc dot gnu dot org
2006-01-28 20:50 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-28 20:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-01-28 20:49 -------
Confirmed and then ...
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-01-28 20:49:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/25980] [DR 218] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
` (3 preceding siblings ...)
2006-01-28 20:49 ` [Bug c++/25980] [DR 218] " pinskia at gcc dot gnu dot org
@ 2006-01-28 20:50 ` pinskia at gcc dot gnu dot org
2006-09-19 4:12 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-28 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-01-28 20:50 -------
Suspending based on the fact the defect report is still opened.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |SUSPENDED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/25980] [DR 218] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
` (4 preceding siblings ...)
2006-01-28 20:50 ` pinskia at gcc dot gnu dot org
@ 2006-09-19 4:12 ` pinskia at gcc dot gnu dot org
2006-09-19 4:15 ` pinskia at gcc dot gnu dot org
2006-09-19 4:17 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-19 4:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-09-19 04:12 -------
(In reply to comment #2)
> I believe there alreay is a PR for this. The proper action is to
> suspend it until the issue is completely resolved.
Yes PR 17365.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |17365
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/25980] [DR 218] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
` (5 preceding siblings ...)
2006-09-19 4:12 ` pinskia at gcc dot gnu dot org
@ 2006-09-19 4:15 ` pinskia at gcc dot gnu dot org
2006-09-19 4:17 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-19 4:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2006-09-19 04:15 -------
*** Bug 17045 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc-bugzilla at contacts dot
| |eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/25980] [DR 218] Unexpected name conflict between symbols
2006-01-26 18:39 [Bug c++/25980] New: Unexpected name conflict between symbols dwhorton at gmail dot com
` (6 preceding siblings ...)
2006-09-19 4:15 ` pinskia at gcc dot gnu dot org
@ 2006-09-19 4:17 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-19 4:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2006-09-19 04:16 -------
I am just going to close this as a dup of bug 17365 which is all the same
issues, finding non functions for ADL.
*** This bug has been marked as a duplicate of 17365 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|SUSPENDED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25980
^ permalink raw reply [flat|nested] 9+ messages in thread