http://llvm.org/bugs/show_bug.cgi?id=7801
Summary: Unallowed cast from incomplete type to void*
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
It seems that clang when compiling this tiny source in C++ mode refuses
to cast void*(*)[] to void*.
The code is compiled without errors in gcc, intel compiler and comeau.
$ cat bug.c
extern void* x[];
void* dummy[] = { &x };
$ gcc -x c -c bug.c
$ gcc -x c++ -c bug.c
$ clang -x c -c bug.c
$ clang -x c++ -c bug.c
bug.c:2:19: error: cannot initialize an array element of type 'void *'
with an
rvalue of type 'void *(*)[]'
void* dummy[] = { &x };
^~
1 error generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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