[LLVMbugs] [Bug 16775] New: lvalue is not a null pointer constant
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 2 02:33:24 PDT 2013
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: unassignedclangbugs at nondot.org
Reporter: vanyacpp at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130802/bac7fc4e/attachment.html>
More information about the llvm-bugs
mailing list