From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: lots of unused variable warnings in assert-free builds |
Date: | 2012-01-24 17:25:09 |
Message-ID: | CA+TgmobathBvzr0ZJ_c0mxNYJwe_WJhBTmVNtoFXE+icWchR+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 24, 2012 at 12:12 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Spraying the code with __attribute__((unused)) is somewhat undesirable
>> because it could mask a failure to properly initialize the variable in
>> an assert-enabled build.
>
> Ouch. Is it really true that __attribute__((unused)) disables detection
> of use of uninitialized variables? That would be nasty, and it's not
> obvious to me why it should need to work like that. But if it is true,
> then I agree that that makes this approach not too tenable.
Oh, I think maybe I am confused. The downsides of disabling *unused*
variable detection are obviously much less than the downsides of
disabling *uninitialized* variable declaration... although neither is
ideal.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-01-24 17:26:58 | Re: [v9.2] Fix Leaky View Problem |
Previous Message | Tom Lane | 2012-01-24 17:12:56 | Re: lots of unused variable warnings in assert-free builds |