Re: unconstify equivalent for volatile

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: unconstify equivalent for volatile
Date: 2019-03-19 10:52:47
Message-ID: 9f355e2f-e3a0-9dff-e205-4bc764c67c29@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-02-18 16:42, Andres Freund wrote:
> On February 18, 2019 7:39:25 AM PST, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>> I propose to add an equivalent to unconstify() for volatile. When
>> working on this, I picked the name unvolatize() mostly as a joke, but
>> it
>> appears it's a real word. Other ideas?
>
> Shouldn't we just remove just about all those use of volatile? Basically the only valid use these days is on sigsetjmp call sites.

So, after some recent cleanups and another one attached here, we're now
down to 1.5 uses of this. (0.5 because the hunk in pmsignal.c doesn't
have a cast right now, but it would need one if s/MemSet/memset/.)
Those seem legitimate.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-Initialize-structure-at-declaration.patch text/plain 1.0 KB
v2-0002-Add-macro-to-cast-away-volatile-without-allowing-.patch text/plain 2.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2019-03-19 11:00:01 Re: ALTER TABLE on system catalogs
Previous Message Prajwal A V 2019-03-19 10:51:16 Contribution to Perldoc for TestLib module in Postgres