https://llvm.org/bugs/show_bug.cgi?id=24138
Bug ID: 24138
Summary: Compiler accepting ill-formed program trying to define
a struct via using-declaration
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Consider the following program:
namespace R {
struct f;
}
namespace S {
using R::f;
}
struct S::f {};
int main() {}
But clang compiles it without any error messages. The expected behaviour is to
get an error message.
The program is ill-formed by the following clauses in the c++ standard:
* [class]p11 ( http://eel.is/c++draft/class#11 ):
Note especially the sentence "i.e., not merely inherited or introduced by a
using-declaration"
* [dcl.meaning]p1 ( http://eel.is/c++draft/dcl.meaning#1 ):
Not especially the sentence "the member shall not merely have been introduced
by a using-declaration in the scope of the class or namespace nominated by the
nested-name-specifier of the declarator-id."
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs