[LLVMbugs] [Bug 16850] New: __uuidof should introduce an identifier into the namespace
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 9 12:09:06 PDT 2013
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: unassignedclangbugs at nondot.org
Reporter: david.majnemer at gmail.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130809/15b09894/attachment.html>
More information about the llvm-bugs
mailing list