c++/6734: Overly permissive name lookup
ericcrampton@hotmail.com
ericcrampton@hotmail.com
Mon May 20 05:36:00 GMT 2002
>Number: 6734
>Category: c++
>Synopsis: Overly permissive name lookup
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 20 05:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: ericcrampton@hotmail.com
>Release: gcc-3.1 and gcc-3.0.4
>Organization:
>Environment:
Redhat Linux 7.2 (Intel), verified on gcc-3.1 and gcc-3.0.4
>Description:
The code below compiles, but it should not. The compiler is allowing a class and namespace to have the same name, but it should not.
FWIW, Comeau's compiler rejects this code.
namespace Foo
{
}
class Foo
{
};
int main()
{
}
>How-To-Repeat:
Compile the code in the description.
>Fix:
Output an error.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list