[LLVMbugs] [Bug 7033] New: Error on cast involving const and non const cast operators
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 3 14:34:49 PDT 2010
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: unassignedbugs at nondot.org
ReportedBy: John.Thompson.JTSoftware at gmail.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list