dave | 11 Nov 2008 17:00

Re: Recent change may be triggering a gcc bug

Quoting David Philippi <david <at> torangan.de>:

> Am Dienstag, 11. November 2008 16:35:47 schrieb Bruno Wolff III:
>> The recent change to upload preferences is generating a gcc warning on my
>> box that blocks building with the default options. I have looked at the
>> code and tried some tweaks, but as far as I can tell the code is correct
>> and gcc is wrong. Can someone else look and see if that's what it looks
>> like to them?
>
> I'd say that evaluating preferences::upload_log which is a function name and
> thus yields a pointer to its address will actually be always true. If you
> insert () into the offending line to make it call the method you'll get a
> bool and gcc is happy again. ;-)

Yeah, my bad. I've fixed this now.

>
> Bye,
> David
>
> _______________________________________________
> Wesnoth-dev mailing list
> Wesnoth-dev <at> gna.org
> https://mail.gna.org/listinfo/wesnoth-dev
>
Bruno Wolff III | 11 Nov 2008 23:02
Picon

Re: Recent change may be triggering a gcc bug

On Tue, Nov 11, 2008 at 11:00:45 -0500,
  dave <at> whitevine.net wrote:
> Quoting David Philippi <david <at> torangan.de>:
> 
> > Am Dienstag, 11. November 2008 16:35:47 schrieb Bruno Wolff III:
> >> The recent change to upload preferences is generating a gcc warning on my
> >> box that blocks building with the default options. I have looked at the
> >> code and tried some tweaks, but as far as I can tell the code is correct
> >> and gcc is wrong. Can someone else look and see if that's what it looks
> >> like to them?
> >
> > I'd say that evaluating preferences::upload_log which is a function name and
> > thus yields a pointer to its address will actually be always true. If you
> > insert () into the offending line to make it call the method you'll get a
> > bool and gcc is happy again. ;-)
> 
> Yeah, my bad. I've fixed this now.

I was looking at the wrong line. I thought it was the function in the if
test that was being complained about, not the call to set the preference.

Gmane