public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23594] New: namespace typedef kills non-namespace typedef when "using" it
@ 2005-08-27 13:53 yuri at tsoft dot com
2005-08-27 15:23 ` [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: yuri at tsoft dot com @ 2005-08-27 13:53 UTC (permalink / raw)
To: gcc-bugs
I have the same typedef in global scope and in the namespace.
Also I have "using" clause for this namespace.
If both typedefs are in place further code doesn't see typedefed type at all.
See example below.
Yuri
--begin code--
typedef int COUNT;
namespace NN {
typedef int COUNT;
};
using namespace NN;
COUNT xx;
--end code--
gives an error:
error: `COUNT' does not name a type
--
Summary: namespace typedef kills non-namespace typedef when
"using" it
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yuri at tsoft dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: FreeBSD on i386
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
2005-08-27 13:53 [Bug c++/23594] New: namespace typedef kills non-namespace typedef when "using" it yuri at tsoft dot com
@ 2005-08-27 15:23 ` pinskia at gcc dot gnu dot org
2005-08-27 17:05 ` yuri at tsoft dot com
2005-08-27 18:37 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-27 15:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-27 15:19 -------
Confirmed, not a regression.
Note if they were two differrent types then this would be invalid code.
PS. the semicolon after the end of the namespace really makes this code invalid but since this is not
what the bug is about I am going to ignore it (we do error out with -pedantic).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Known to fail| |2.95.3 3.2.3 3.4.0 4.0.0
| |4.1.0 3.0.4
Last reconfirmed|0000-00-00 00:00:00 |2005-08-27 15:19:14
date| |
Summary|namespace typedef kills non-|namespace typedef and global
|namespace typedef when |typedef name the same type,
|"using" it |using kills global
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
2005-08-27 13:53 [Bug c++/23594] New: namespace typedef kills non-namespace typedef when "using" it yuri at tsoft dot com
2005-08-27 15:23 ` [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global pinskia at gcc dot gnu dot org
@ 2005-08-27 17:05 ` yuri at tsoft dot com
2005-08-27 18:37 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 9+ messages in thread
From: yuri at tsoft dot com @ 2005-08-27 17:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From yuri at tsoft dot com 2005-08-27 16:59 -------
(In reply to comment #1)
...
> PS. the semicolon after the end of the namespace really makes this code
invalid but since this is not
...
I didn't get why semicolon makes it invalid.
I thought semicolon is allowed between any statements.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
2005-08-27 13:53 [Bug c++/23594] New: namespace typedef kills non-namespace typedef when "using" it yuri at tsoft dot com
2005-08-27 15:23 ` [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global pinskia at gcc dot gnu dot org
2005-08-27 17:05 ` yuri at tsoft dot com
@ 2005-08-27 18:37 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-27 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-27 17:05 -------
(In reply to comment #2)
> (In reply to comment #1)
> ...
> > PS. the semicolon after the end of the namespace really makes this code
> invalid but since this is not
> ...
> I didn't get why semicolon makes it invalid.
> I thought semicolon is allowed between any statements.
Because namespace (and extern "C") blocks are not statements.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
[not found] <bug-23594-6649@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2010-06-02 18:24 ` jason at gcc dot gnu dot org
@ 2010-06-02 19:25 ` jason at gcc dot gnu dot org
4 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-02 19:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jason at gcc dot gnu dot org 2010-06-02 19:25 -------
Fixed for 4.6.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
[not found] <bug-23594-6649@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-06-02 17:37 ` paolo dot carlini at oracle dot com
@ 2010-06-02 18:24 ` jason at gcc dot gnu dot org
2010-06-02 19:25 ` jason at gcc dot gnu dot org
4 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-02 18:24 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-08-27 15:19:14 |2010-06-02 18:24:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
[not found] <bug-23594-6649@http.gcc.gnu.org/bugzilla/>
2005-11-09 17:03 ` pinskia at gcc dot gnu dot org
2005-11-09 17:25 ` pinskia at gcc dot gnu dot org
@ 2010-06-02 17:37 ` paolo dot carlini at oracle dot com
2010-06-02 18:24 ` jason at gcc dot gnu dot org
2010-06-02 19:25 ` jason at gcc dot gnu dot org
4 siblings, 0 replies; 9+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-02 17:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo dot carlini at oracle dot com 2010-06-02 17:37 -------
*** Bug 44333 has been marked as a duplicate of this bug. ***
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo dot carlini at oracle
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
[not found] <bug-23594-6649@http.gcc.gnu.org/bugzilla/>
2005-11-09 17:03 ` pinskia at gcc dot gnu dot org
@ 2005-11-09 17:25 ` pinskia at gcc dot gnu dot org
2010-06-02 17:37 ` paolo dot carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-09 17:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-11-09 17:25 -------
Related to PR 9726.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |9726
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global
[not found] <bug-23594-6649@http.gcc.gnu.org/bugzilla/>
@ 2005-11-09 17:03 ` pinskia at gcc dot gnu dot org
2005-11-09 17:25 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-09 17:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-11-09 17:03 -------
*** Bug 24758 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hhinnant at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23594
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-06-02 19:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-27 13:53 [Bug c++/23594] New: namespace typedef kills non-namespace typedef when "using" it yuri at tsoft dot com
2005-08-27 15:23 ` [Bug c++/23594] namespace typedef and global typedef name the same type, using kills global pinskia at gcc dot gnu dot org
2005-08-27 17:05 ` yuri at tsoft dot com
2005-08-27 18:37 ` pinskia at gcc dot gnu dot org
[not found] <bug-23594-6649@http.gcc.gnu.org/bugzilla/>
2005-11-09 17:03 ` pinskia at gcc dot gnu dot org
2005-11-09 17:25 ` pinskia at gcc dot gnu dot org
2010-06-02 17:37 ` paolo dot carlini at oracle dot com
2010-06-02 18:24 ` jason at gcc dot gnu dot org
2010-06-02 19:25 ` jason 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).