[LLVMbugs] [Bug 24264] New: Name hiding in the same declarative region fails when done via using-directive
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jul 25 10:27:58 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24264
Bug ID: 24264
Summary: Name hiding in the same declarative region fails when
done via using-directive
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: anders.granlund.0 at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Consider the following well-formed program:
namespace N { struct x {}; }
using namespace N;
int x;
int main() { sizeof (x); }
Compile it with the following command line:
clang++ prog.cc -std=c++98 -pedantic-errors
Observe that error messages about name lookup ambiguity are given. I expect to
get no errors when compiling since the program is well-formed.
That the program is well-formed can be seen by applying both [namespace.udir]/2
and [basic.scope.hiding]/2:
http://eel.is/c++draft/dcl.dcl#namespace.udir-2
http://eel.is/c++draft/basic.scope.hiding#2
This seems reasonable also, so I don't think this is a defect of the c++
standard.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150725/75334696/attachment.html>
More information about the llvm-bugs
mailing list