This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Strange g++ behaviour?
- To: David Howells <David dot Howells at nexor dot co dot uk>
- Subject: Re: Strange g++ behaviour?
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 27 Jul 2000 18:26:03 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <200007271107.IAA19770@cacau.lsd.ic.unicamp.br>
On Jul 27, 2000, David Howells <David.Howells@nexor.co.uk> wrote:
> g++query.cpp:20: warning: choosing `comptr_t<int>::operator int *()' over `comptr_t<int>::operator bool() const'
> g++query.cpp:20: warning: for conversion from `pint' to `bool'
> Why is g++ reluctant to use the "operator bool() const" method?
You've already got the answer:
> g++query.cpp:20: warning: because conversion sequence for the argument is better
> And does it really need to give the warning message?
Nope, it's just that too many people ask this question, so we put the
answer in a warning message.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me