http://llvm.org/bugs/show_bug.cgi?id=7033
Summary: Error on cast involving const and non const cast
operators
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
class String
{
public:
String();
operator char *();
operator const char *();
};
String s;
const char * p = (const char *)s;
C:\Sony\Clang\exp>clang -cc1 pctchar.cpp
pctchar.cpp:9:18: error: cannot cast from type 'String' to pointer type 'char
const *'
const char * p = (const char *)s;
^~~~~~~~~~~~~~
1 error generated.
gcc compiles the above without error.
--
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