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: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Subject: Re: gcc-2.95 bug report
- From: Adam McKee <amckee at home dot com>
- Date: Thu, 12 Aug 1999 20:50:25 -0600 (CST)
- cc: gcc-bugs at gcc dot gnu dot org
It's good to be wrong! It should have occurred to me that the (Object) =>
(const Object) conversion would be required.
Anyway my code is compiling without incident now. Thanks very much, and
I really appreciated the quick response.
-------------------------------------------------------------------------------
Adam McKee phone: (306) 343-0881 (home)
Programmer/Analyst (306) 933-1544 (work)
SED Systems, Inc. email: amckee@iname.com
===============================================================================
"Very damaged. Zathrus can never have anything nice." - Zathrus on Babylon 5
===============================================================================
On 12 Aug 1999, Alexandre Oliva wrote:
> 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
>