https://llvm.org/bugs/show_bug.cgi?id=24203
Bug ID: 24203
Summary: Programs with ill-formed declarations not declaring
anything compiles
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
I have found the following c++ standard violations in clang, all related to
ill-formed edge cases of declarations:
* Test-case 1:
int;
int main() {}
This program is ill-formed by [dcl.dcl]/5 in the c++ standard (See
http://eel.is/c++draft/dcl.dcl#5 ). Clang compiles it without any error
messages. Since the program is ill-formed, I expect to get at least one error
message.
* Test-case 2:
enum {};
int main() {}
This program is ill-formed by [dcl.dcl]/5 in the c++ standard (See
http://eel.is/c++draft/dcl.dcl#5 ). Clang compiles it without any error
messages. Since the program is ill-formed, I expect to get at least one error
message.
* Test-case 3:
typedef typedef int T;
int main() {}
This program is ill-formed by [decl.spec]/2 in the c++ standard (See
http://eel.is/c++draft/dcl.dcl#dcl.spec-2 ). Clang compiles it without any
error messages. Since the program is ill-formed, I expect to get at least one
error message.
--
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