[LLVMbugs] [Bug 10259] New: Fake ambiguity between scoped redeclaration of class found via inline anonymous namespace
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 3 22:14:56 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10259
Summary: Fake ambiguity between scoped redeclaration of class
found via inline anonymous namespace
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rjmccall at apple.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
// scoped declaration fails (correctly: [namespace.qual]p7) if namespace isn't
inline
// works if namespace isn't anonymous
inline namespace {
class A;
}
// if not scoped, ambiguity is real, no bug
class ::A {};
A a;
daysthatwere:trunk glamr$ clang -std=c++0x /tmp/red3.cpp
/tmp/red3.cpp:5:1: error: reference to 'A' is ambiguous
A a;
^
/tmp/red3.cpp:4:9: note: candidate found by name lookup is 'A'
class ::A {};
^
/tmp/red3.cpp:2:9: note: candidate found by name lookup is '<anonymous
namespace>::A'
class A;
^
/tmp/red3.cpp:5:3: error: variable has incomplete type '<anonymous>::A'
A a;
^
/tmp/red3.cpp:2:9: note: forward declaration of '<anonymous>::A'
class A;
^
2 errors generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list