c++/9726: namespace typedef hides global
joerg.richter@pdv-fs.de
joerg.richter@pdv-fs.de
Mon Feb 17 16:06:00 GMT 2003
>Number: 9726
>Category: c++
>Synopsis: namespace typedef hides global
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 17 16:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: joerg.richter@pdv-fs.de
>Release: gcc3.2.1
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
compile following code and you will get the error at "foo a;" in main.
-----------------
class foo
{};
namespace bar
{
typedef ::foo foo;
}
using namespace bar;
int main()
{
foo a; // `foo' undeclared (first use this function)
}
>How-To-Repeat:
>Fix:
replacing the "typedef" with an "using" solves the problem
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list