http://llvm.org/bugs/show_bug.cgi?id=15319
Bug ID: 15319
Summary: Objective-C++ @encode() behaves incorrectly for
nullptr_t
Product: clang
Version: 3.2
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 10050
--> http://llvm.org/bugs/attachment.cgi?id=10050&action=edit
Trivial test
Actual version: Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
In Objective-C++ and C++11 mode, @encode(std::nullptr_t) produces "i", which is
conceptually wrong and also implies the wrong size on LP64 platforms. A more
logical encoding would be "^?" or "^v". I assume this is an oversight, but if
there is some reason to use an integer encoding it should be "l".
The output of the attached test case on 64-bit OS X is:
std::nullptr_t: "i" - 8 bytes
int: "i" - 4 bytes
void *: "^v" - 8 bytes
With libc++ in C++98 mode, the output is:
std::nullptr_t: "{nullptr_t=^v}" - 8 bytes
int: "i" - 4 bytes
void *: "^v" - 8 bytes
--
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