pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fix volatile vs. pointer confusion
Date: Wed, 13 Mar 2019 10:14:32 +0100
Message-ID: <b43d380c-e3be-886b-6ed2-ca3cdba9f3f6@2ndquadrant.com> (raw)
In-Reply-To: <20190311115739.GA5231@alvherre.pgsql>
References: <20190311115739.GA5231@alvherre.pgsql>

On 2019-03-11 12:57, Alvaro Herrera wrote:
> Looking at recently committed 2e616dee9e60, we have introduced this:
> 
> +       volatile xmlBufferPtr buf = NULL;
> +       volatile xmlNodePtr cur_copy = NULL;
> 
> where the pointer-ness nature of the object is inside the typedef.  I
> *suppose* that this is correct as written.  There are a few occurrences
> of this pattern in eg. contrib/xml2.

I think this is correct, but I don't want to wreck my sanity trying to
understand the syntax-level details of why.

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




view thread (6+ messages)  latest in thread

Message-ID: <b43d380c-e3be-886b-6ed2-ca3cdba9f3f6@2ndquadrant.com>
Permalink:  ../b43d380c-e3be-886b-6ed2-ca3cdba9f3f6@2ndquadrant.com/
Also on:    postgresql.org/message-id/b43d380c-e3be-886b-6ed2-ca3cdba9f3f6@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, alvherre@2ndquadrant.com
  Subject: Re: Fix volatile vs. pointer confusion
  In-Reply-To: <b43d380c-e3be-886b-6ed2-ca3cdba9f3f6@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox