Re: unconstify equivalent for volatile

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unconstify equivalent for volatile
Date: 2019-02-18 20:18:42
Message-ID: 03081802-8268-cc86-fab7-e5562d54532d@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18/02/2019 16:43, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> 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?
>
> Umm ... wouldn't this amount to papering over actual bugs? I can
> think of legitimate reasons to cast away const, but casting away
> volatile seems pretty dangerous, and not something to encourage
> by making it notationally easy.
>

I'd argue that it's not making it easier to do but rather easier to spot
(vs normal type casting) which is IMO a good thing from patch review
perspective.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-02-18 20:20:55 Re: unconstify equivalent for volatile
Previous Message Tom Lane 2019-02-18 19:49:29 Re: Missing Column names with multi-insert