public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13157] New: Argument Dependent Lookup Failure
@ 2003-11-22 0:54 dave at boost-consulting dot com
2003-11-22 0:55 ` [Bug c++/13157] " dave at boost-consulting dot com
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: dave at boost-consulting dot com @ 2003-11-22 0:54 UTC (permalink / raw)
To: gcc-bugs
The attached should compile, but fails.
--
Summary: Argument Dependent Lookup Failure
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dave at boost-consulting dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
@ 2003-11-22 0:55 ` dave at boost-consulting dot com
2003-11-22 1:28 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dave at boost-consulting dot com @ 2003-11-22 0:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dave at boost-consulting dot com 2003-11-22 00:55 -------
Created an attachment (id=5187)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5187&action=view)
zipped preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
2003-11-22 0:55 ` [Bug c++/13157] " dave at boost-consulting dot com
@ 2003-11-22 1:28 ` pinskia at gcc dot gnu dot org
2003-11-22 1:54 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-22 1:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-22 01:28 -------
Most likely fixed for 3.4 but I have not checked.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
2003-11-22 0:55 ` [Bug c++/13157] " dave at boost-consulting dot com
2003-11-22 1:28 ` pinskia at gcc dot gnu dot org
@ 2003-11-22 1:54 ` pinskia at gcc dot gnu dot org
2003-11-22 3:42 ` dave at boost-consulting dot com
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-22 1:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-22 01:54 -------
Actually the code should not be able to compile:
The following lines cause this (and the others like them):
using ::std::abs;
using ::std::sinh;
using ::std::sqrt;
In boost::math::sinhc_pi and others.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (2 preceding siblings ...)
2003-11-22 1:54 ` pinskia at gcc dot gnu dot org
@ 2003-11-22 3:42 ` dave at boost-consulting dot com
2003-11-24 14:29 ` bangerth at dealii dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dave at boost-consulting dot com @ 2003-11-22 3:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dave at boost-consulting dot com 2003-11-22 03:42 -------
Wrong again. Unqualified calls are subject to argument dependent lookup
regardless of what names are brought in via using declarations. The reduced
case is:
#include <cmath>
namespace fu
{
template <class T>
struct X
{};
template <class T>
X<T> test(X<T> x)
{
using ::std::abs;
return abs(x);
}
template <class T>
X<T> abs(X<T>);
X<int> x;
X<int> z = test(x);
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (3 preceding siblings ...)
2003-11-22 3:42 ` dave at boost-consulting dot com
@ 2003-11-24 14:29 ` bangerth at dealii dot org
2004-01-03 11:54 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2003-11-24 14:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2003-11-24 14:29 -------
Yes, this should compile.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-24 14:29:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (4 preceding siblings ...)
2003-11-24 14:29 ` bangerth at dealii dot org
@ 2004-01-03 11:54 ` pinskia at gcc dot gnu dot org
2004-01-03 12:00 ` [Bug c++/13157] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-03 11:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-03 11:54 -------
*** Bug 13553 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |john at johnmaddock dot co
| |dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] [3.3/3.4 Regression] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (5 preceding siblings ...)
2004-01-03 11:54 ` pinskia at gcc dot gnu dot org
@ 2004-01-03 12:00 ` pinskia at gcc dot gnu dot org
2004-01-05 2:20 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-03 12:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-03 12:00 -------
Here is an example without using the namespace std (as that is a special namespace for 2.95.3):
namespace aa
{
double abs(double);
long double abs(long double);
}
namespace fu
{
template <class T>
struct X
{};
template <class T>
X<T> test(X<T> x)
{
using ::aa::abs;
return abs(x);
}
template <class T>
X<T> abs(X<T>);
X<int> x;
X<int> z = test(x);
}
>From Phil's regression hunter: Search converges between 2001-02-25-trunk (#8) and 2001-03
-04-trunk (#9).
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Summary|Argument Dependent Lookup |[3.3/3.4 Regression]
|Failure |Argument Dependent Lookup
| |Failure
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] [3.3/3.4 Regression] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (6 preceding siblings ...)
2004-01-03 12:00 ` [Bug c++/13157] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-01-05 2:20 ` mmitchel at gcc dot gnu dot org
2004-01-05 6:25 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-05 2:20 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] [3.3/3.4 Regression] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (7 preceding siblings ...)
2004-01-05 2:20 ` mmitchel at gcc dot gnu dot org
@ 2004-01-05 6:25 ` cvs-commit at gcc dot gnu dot org
2004-01-05 6:26 ` [Bug c++/13157] [3.3 " mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-05 6:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-05 06:24 -------
Subject: Bug 13157
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-01-05 06:24:47
Modified files:
gcc/cp : ChangeLog name-lookup.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: koenig3.C
Log message:
PR c++/13157
* name-lookup.c (lookup_using_namespace): Remove spacesp
parameter.
(unqualified_namespace_lookup): Likewise.
(lookup_qualified_name): Adjust accordingly.
(lookup_name_real): Likewise.
(lookup_arg_dependent): Do not eliminate the namespace of the
functions found by unqualified name lookup unless that is the
current namespace.
PR c++/13157
* g++.dg/template/koenig3.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3853&r2=1.3854
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.30&r2=1.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3334&r2=1.3335
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/koenig3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] [3.3 Regression] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (8 preceding siblings ...)
2004-01-05 6:25 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-05 6:26 ` mmitchel at gcc dot gnu dot org
2004-01-05 7:47 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-05 6:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-01-05 06:26 -------
Fixed in GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
Summary|[3.3/3.4 Regression] |[3.3 Regression] Argument
|Argument Dependent Lookup |Dependent Lookup Failure
|Failure |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] [3.3 Regression] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (9 preceding siblings ...)
2004-01-05 6:26 ` [Bug c++/13157] [3.3 " mmitchel at gcc dot gnu dot org
@ 2004-01-05 7:47 ` pinskia at gcc dot gnu dot org
2004-02-15 12:37 ` gdr at gcc dot gnu dot org
2004-04-27 6:35 ` gdr at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-05 7:47 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.0 |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] [3.3 Regression] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (10 preceding siblings ...)
2004-01-05 7:47 ` pinskia at gcc dot gnu dot org
@ 2004-02-15 12:37 ` gdr at gcc dot gnu dot org
2004-04-27 6:35 ` gdr at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-15 12:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2004-02-15 12:37 -------
Adjust milestone
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.3.3 |3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/13157] [3.3 Regression] Argument Dependent Lookup Failure
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
` (11 preceding siblings ...)
2004-02-15 12:37 ` gdr at gcc dot gnu dot org
@ 2004-04-27 6:35 ` gdr at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-04-27 6:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2004-04-27 06:30 -------
This has been fixed in 3.4.0 and 3.5.0.
During the parser rewriting, many functions saw the light but there are little
or no corresponding entries in the ChangeLog (contrary to our conventions),
so it is a bit hard to have a
backport that is close to 3.4.0 codes.
Won't fix in 3.3.x.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|3.3.4 |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13157
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2004-04-27 6:30 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-22 0:54 [Bug c++/13157] New: Argument Dependent Lookup Failure dave at boost-consulting dot com
2003-11-22 0:55 ` [Bug c++/13157] " dave at boost-consulting dot com
2003-11-22 1:28 ` pinskia at gcc dot gnu dot org
2003-11-22 1:54 ` pinskia at gcc dot gnu dot org
2003-11-22 3:42 ` dave at boost-consulting dot com
2003-11-24 14:29 ` bangerth at dealii dot org
2004-01-03 11:54 ` pinskia at gcc dot gnu dot org
2004-01-03 12:00 ` [Bug c++/13157] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2004-01-05 2:20 ` mmitchel at gcc dot gnu dot org
2004-01-05 6:25 ` cvs-commit at gcc dot gnu dot org
2004-01-05 6:26 ` [Bug c++/13157] [3.3 " mmitchel at gcc dot gnu dot org
2004-01-05 7:47 ` pinskia at gcc dot gnu dot org
2004-02-15 12:37 ` gdr at gcc dot gnu dot org
2004-04-27 6:35 ` gdr 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).