Re: unconstify equivalent for volatile

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-18T20:20:55Z
Lists: pgsql-hackers
Petr Jelinek <petr.jelinek@2ndquadrant.com> writes:
> On 18/02/2019 16:43, Tom Lane wrote:
>> Umm ... wouldn't this amount to papering over actual bugs?

> 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.

Yeah, fair point.  As Peter noted about unconstify, these could be
viewed as TODO markers.

			regards, tom lane


Commits

  1. Add macro to cast away volatile without allowing changes to underlying type

  2. Initialize structure at declaration