http://llvm.org/bugs/show_bug.cgi?id=16775
Bug ID: 16775
Summary: lvalue is not a null pointer constant
Product: clang
Version: 3.2
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Clang accepts the following code:
const int a = 0;
void* b = a;
According to [conv.ptr]p1:
A null pointer constant is an integral constant expression (5.19) prvalue of
integer type that evaluates to zero or a prvalue of type std::nullptr_t.
I believe this code should be rejected as expression "a" is not a prvalue.
--
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