public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <20030419003600.10437.dean@foster.net>]
* [Bug c++/10437] "using namespace" at global scope creates incorrect code
[not found] <20030419003600.10437.dean@foster.net>
@ 2003-12-18 18:27 ` dhazeghi at yahoo dot com
2003-12-22 15:57 ` nathan at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-12-18 18:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dhazeghi at yahoo dot com 2003-12-18 18:07 -------
Nathan, would you mind commenting on the validity of this code? Thanks.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10437
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/10437] "using namespace" at global scope creates incorrect code
[not found] <20030419003600.10437.dean@foster.net>
2003-12-18 18:27 ` dhazeghi at yahoo dot com
@ 2003-12-22 15:57 ` nathan at gcc dot gnu dot org
2003-12-22 16:51 ` nathan at gcc dot gnu dot org
2004-08-16 19:02 ` bangerth at dealii dot org
3 siblings, 0 replies; 7+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-12-22 15:57 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Status|REOPENED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10437
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/10437] "using namespace" at global scope creates incorrect code
[not found] <20030419003600.10437.dean@foster.net>
2003-12-18 18:27 ` dhazeghi at yahoo dot com
2003-12-22 15:57 ` nathan at gcc dot gnu dot org
@ 2003-12-22 16:51 ` nathan at gcc dot gnu dot org
2004-08-16 19:02 ` bangerth at dealii dot org
3 siblings, 0 replies; 7+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-12-22 16:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From nathan at gcc dot gnu dot org 2003-12-22 16:36 -------
Ok, First point1. Do using declarations work retroactively in this regard.
For a dependent name, the answer is yes, sort of. [14.6.4] lists the places you
look to resolve a dependent name, and they are
1) declarations that are visible at the point of definition of the template
2) declarations from namespaces associated with the type of the function arguments
both from the instantiation context and from the definition context.
That 2nd part is an amalgamated koenig lookup. In this case the type is int, so
has no associated namespaces, and hence adds nothing to the overload set.
Thus, I believe instantiation of bar will give an unresolved call for foo.
Now the second point. This a case of SFINAE failure, no diagnostic should
be issued. The call of foo in bar must resolve to ::foo(int), as the other
posibility ::foo<int>(const int &) gives a substitution failure.
The EDG compiler accepts this code.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|nathan at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10437
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/10437] "using namespace" at global scope creates incorrect code
[not found] <20030419003600.10437.dean@foster.net>
` (2 preceding siblings ...)
2003-12-22 16:51 ` nathan at gcc dot gnu dot org
@ 2004-08-16 19:02 ` bangerth at dealii dot org
3 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-08-16 19:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-08-16 19:02 -------
Still happens. To my great surprise, icc also barfs at the
example listed as "point 2", with the same error message as gcc.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|0000-00-00 00:00:00 |2004-08-16 19:02:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10437
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-13 10:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-10437-4@http.gcc.gnu.org/bugzilla/>
2014-05-12 23:52 ` [Bug c++/10437] "using namespace" at global scope creates incorrect code richard-gccbugzilla at metafoo dot co.uk
2014-05-13 8:28 ` redi at gcc dot gnu.org
2014-05-13 10:59 ` paolo.carlini at oracle dot com
[not found] <20030419003600.10437.dean@foster.net>
2003-12-18 18:27 ` dhazeghi at yahoo dot com
2003-12-22 15:57 ` nathan at gcc dot gnu dot org
2003-12-22 16:51 ` nathan at gcc dot gnu dot org
2004-08-16 19:02 ` bangerth at dealii 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).