public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44333] New: Ambiguity with typedef and using namespace
@ 2010-05-30 15:39 paolo dot carlini at oracle dot com
2010-05-30 15:54 ` [Bug c++/44333] " paolo dot carlini at oracle dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-30 15:39 UTC (permalink / raw)
To: gcc-bugs
I would really like this to be possible, would help me a lot in getting rid of
<cstddef> uses in the library, and it is indeed possible with ICC and Comeau,
and SunStudio, but GCC doesn't like it, for some reason.
typedef unsigned my_size_t;
namespace my
{
typedef unsigned my_size_t;
}
using namespace my;
my_size_t s1; // error
namespace my2
{
using namespace my;
my_size_t s1; // error
}
I'm pretty sure to have seen it already, still... Jason what do you think?
--
Summary: Ambiguity with typedef and using namespace
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paolo dot carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44333
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/44333] Ambiguity with typedef and using namespace
2010-05-30 15:39 [Bug c++/44333] New: Ambiguity with typedef and using namespace paolo dot carlini at oracle dot com
@ 2010-05-30 15:54 ` paolo dot carlini at oracle dot com
2010-06-02 17:37 ` paolo dot carlini at oracle dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-30 15:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2010-05-30 15:54 -------
And replacing both:
using namespace my;
with
using my::my_size_t;
instead works. This is crazy (IMHO ;) and would not be a workaround for me)
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.5.0 |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44333
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/44333] Ambiguity with typedef and using namespace
2010-05-30 15:39 [Bug c++/44333] New: Ambiguity with typedef and using namespace paolo dot carlini at oracle dot com
2010-05-30 15:54 ` [Bug c++/44333] " paolo dot carlini at oracle dot com
@ 2010-06-02 17:37 ` paolo dot carlini at oracle dot com
2010-06-02 19:20 ` jason at gcc dot gnu dot org
2010-06-02 20:26 ` paolo dot carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-02 17:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2010-06-02 17:37 -------
So it's already known...
*** This bug has been marked as a duplicate of 23594 ***
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44333
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/44333] Ambiguity with typedef and using namespace
2010-05-30 15:39 [Bug c++/44333] New: Ambiguity with typedef and using namespace paolo dot carlini at oracle dot com
2010-05-30 15:54 ` [Bug c++/44333] " paolo dot carlini at oracle dot com
2010-06-02 17:37 ` paolo dot carlini at oracle dot com
@ 2010-06-02 19:20 ` jason at gcc dot gnu dot org
2010-06-02 20:26 ` paolo dot carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-02 19:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jason at gcc dot gnu dot org 2010-06-02 19:19 -------
Subject: Bug 44333
Author: jason
Date: Wed Jun 2 19:19:05 2010
New Revision: 160183
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160183
Log:
PR c++/44333
* name-lookup.c (same_entity_p): New.
(ambiguous_decl): Multiple declarations of the same entity
are not ambiguous.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/tc1/dr101.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44333
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/44333] Ambiguity with typedef and using namespace
2010-05-30 15:39 [Bug c++/44333] New: Ambiguity with typedef and using namespace paolo dot carlini at oracle dot com
` (2 preceding siblings ...)
2010-06-02 19:20 ` jason at gcc dot gnu dot org
@ 2010-06-02 20:26 ` paolo dot carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-02 20:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2010-06-02 20:26 -------
Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44333
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-02 20:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-30 15:39 [Bug c++/44333] New: Ambiguity with typedef and using namespace paolo dot carlini at oracle dot com
2010-05-30 15:54 ` [Bug c++/44333] " paolo dot carlini at oracle dot com
2010-06-02 17:37 ` paolo dot carlini at oracle dot com
2010-06-02 19:20 ` jason at gcc dot gnu dot org
2010-06-02 20:26 ` paolo dot carlini at oracle dot com
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).