https://llvm.org/bugs/show_bug.cgi?id=26449
Bug ID: 26449
Summary: Bugs in __builtin_classify_type implementation
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
There are several bugs in __builtin_classify_type implementation:
1) It doesn't support member functions, so the following program crashes clang:
lass cl {
public:
void bar() {}
};
...
int res = __builtin_classify_type(&cl::bar);
2) It returns enumeral_type_class for enums, function_type_class for functions
and array_type_class for arrays in both C and C++ modes. However, gcc returns
integer_type_class for enums and pointer_type_class for arrays and functions in
C mode -- which is correct, as conversions between enums and ints and function
pointers and arrays and pointers can happen everywhere in C. (gcc returns the
same as what clang does in C++ mode, however.)
2) It returns string_type_class for chars, which is odd and doesn't match what
gcc does.
Yours,
Andrey
======
Software Engineer
Intel Compiler Team
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs