Re: -Wcast-qual cleanup, part 1

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: -Wcast-qual cleanup, part 1
Date: 2011-11-10 19:57:43
Message-ID: 1320955063.20692.2.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-11-10 19:57:48 Re: const correctness
Previous Message Steve Singer 2011-11-10 19:52:03 Re: pg_dump 9.1.1 hanging (collectSecLabels gets 0 labels)