URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p2855.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "-Wcast-qual" }
// prms-id: 2855
class Ctest {
private:
char* data;
public:
operator const char *() const;
};
Ctest::operator const char *() const
{
return data;
}
int main()
{
Ctest obj;
char* temp = (char *)obj; // { dg-warning "" }
temp[0] = '\0';
}