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
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).
(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.
(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.
*** Bug 24758 has been marked as a duplicate of this bug. ***
Related to PR 9726.
*** Bug 44333 has been marked as a duplicate of this bug. ***
Fixed for 4.6.