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


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
> 


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