This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc-2.95 bug report


On Aug 12, 1999, Adam McKee <amckee@home.com> wrote:

> I don't see why it would regard the other conversion as better,
> since it will require a conversion from (char*) to (const char*)
> afterward.

But the other requires a conversion from Object to Object const, and
the C++ Standard says this is worse.  

> How can I disable this warning?

Implementing an additional non-const conversor function to const
char* should work:

    operator const char*()
	{ return NULL; }

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]