Re: -Wcast-qual cleanup, part 1 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: -Wcast-qual cleanup, part 1
Date
Msg-id 1320955063.20692.2.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: -Wcast-qual cleanup, part 1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On mån, 2011-11-07 at 10:07 -0500, Tom Lane wrote:
> >> 2. Macros accessing  structures should come in two variants: a
> "get"
> >> version, and a "set"/anything else version, so that the "get"
> version
> >> can preserve the const qualifier.
> 
> I'm not prepared to buy into that as a general coding rule.
> 
> Maybe it would be better to just add -Wno-cast-qual to CFLAGS. 

OK, I understand the concerns that have been raised here and in the
other thread.  I'll work instead on removing "lying" const qualifiers on
the upper layers that were the causes of attempting to push the consts
down.



pgsql-hackers by date:

Previous
From: Steve Singer
Date:
Subject: Re: pg_dump 9.1.1 hanging (collectSecLabels gets 0 labels)
Next
From: "Kevin Grittner"
Date:
Subject: Re: const correctness