Re: Compiler warning with 'fast' variable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiler warning with 'fast' variable
Date: 2009-04-07 23:09:33
Message-ID: 24566.1239145773@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> We could stick a volatile on it but I'd like to find out why this
>> particular variable seems to need that.

> You ready for this; changing 'bool' to 'int' supressed the warning:
> int fast = PG_GETARG_BOOL(1);

Well, that's a compiler bug :-(. Probably platform-specific, too,
which is why I don't see it on HPPA.

I think that the above variant is the least ugly of the alternatives
you show as working, and definitely less ugly than plastering volatile
on it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-04-07 23:21:01 Re: Compiler warning with 'fast' variable
Previous Message Bruce Momjian 2009-04-07 23:04:39 Re: Compiler warning with 'fast' variable