http://llvm.org/bugs/show_bug.cgi?id=16850
Bug ID: 16850
Summary: __uuidof should introduce an identifier into the
namespace
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
the following should compile but doesn't:
#include <stdio.h>
#include <typeinfo>
struct __declspec(uuid("12345678-1234-1234-1234-123456789abC")) uuid;
int main() {
&__uuidof(uuid);
printf("%s\n", typeid(_GUID_12345678_1234_1234_1234_123456789abc).name());
}
if it ran, it would print out:
__s_GUID
"struct __s_GUID" is a builtin type vended by the compiler and holds identical
fields as _GUID.
__uuidof(uuid) introduced a declaration that looks like:
extern "C" const __s_GUID _GUID_12345678_1234_1234_1234_123456789abc;
The expression "__uuidof(uuid)" evaluates to something akin to
"*reinterpret_cast<_GUID *>(&_GUID_12345678_1234_1234_1234_123456789abc)"
--
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