This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-2.95 bug report
- To: Adam McKee <amckee at home dot com>
- Subject: Re: gcc-2.95 bug report
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 12 Aug 1999 23:25:42 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <Pine.LNX.4.10.9908122001460.9047-200000@adam-gw.a.ban>
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