pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: Re: pgsql: Add configure infrastructure to detect support for C99's restric
Date: Wed, 11 Oct 2017 17:13:20 -0700
Message-ID: <20171012001320.4putagiruuehtvb6@alap3.anarazel.de> (raw)
In-Reply-To: <E1e2Q9j-000183-L0@gemulon.postgresql.org>
References: <E1e2Q9j-000183-L0@gemulon.postgresql.org>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Hi,

On 2017-10-11 23:11:15 +0000, Andres Freund wrote:
> Add configure infrastructure to detect support for C99's restrict.
> 
> Will be used in later commits improving performance for a few key
> routines where information about aliasing allows for significantly
> better code generation.
> 
> This allows to use the C99 'restrict' keyword without breaking C89, or
> for that matter C++, compilers. If not supported it's defined to be
> empty.

Woodlouse doesn't like this, erroring out with:
C:\buildfarm\buildenv\HEAD\pgsql.build\src\include\libpq/pqformat.h(47): error C2219: syntax error : type qualifier must be after '*' (src/backend/access/common/printsimple.c) [C:\buildfarm\buildenv\HEAD\pgsql.build\postgres.vcxproj]

It's MSVC being super peculiar about error checks. I think msvc is just
confused by the pointer hiding typedef. Using some online MSVC (and
other compilers) frontend:
https://godbolt.org/g/TD3nmA

I confirmed that removing the pointer hiding typedef indeed resolves the
isssue.

I can't quite decide whether msvc just has taste and dislikes pointer
hiding typedefs as much as I do, or whether it's incredibly stupid ;)

I'll add a comment and use StringInfoData *.

Greetings,

Andres Freund


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (10+ messages)  latest in thread

Message-ID: <20171012001320.4putagiruuehtvb6@alap3.anarazel.de>
Permalink:  ../20171012001320.4putagiruuehtvb6@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20171012001320.4putagiruuehtvb6@alap3.anarazel.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Add configure infrastructure to detect support for C99's restric
  In-Reply-To: <20171012001320.4putagiruuehtvb6@alap3.anarazel.de>
  References: <E1e2Q9j-000183-L0@gemulon.postgresql.org> <20171012001320.4putagiruuehtvb6@alap3.anarazel.de>

* 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