Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2R7w-0005My-UP for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 00:13:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2R7v-0004LM-TI for pgsql-committers@arkaria.postgresql.org; Thu, 12 Oct 2017 00:13:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2R7v-0004Kc-3k for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 00:13:27 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2R7r-0003MH-Hg for pgsql-committers@postgresql.org; Thu, 12 Oct 2017 00:13:26 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1F6D520C90 for ; Wed, 11 Oct 2017 20:13:22 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 11 Oct 2017 20:13:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=IkFOvEAbm2oN2FCE66buBSmgmv9Mc cAH/3XGRcu46zI=; b=F1OnU7SQVmjEYQrMIQR7wgOVogjX3ZQW4DZedC30TLcuo rbofIXEXfr2dcs1isMK+PQN7M5eORjiVECZBqbMYYORd+84qlQd0N47AkhsmS/8p IW9v6Zi+2zhi0jTwqPo52FQeQvXsMXoK8aqaHFZ0WDTCvd9zQn+ghfZ8PJwXKXm1 0+pofNSMgjIUKPCmSoHgBOvwxCbz9DeMwwHYDg5F6TWzPghD7EZKWUtkE5cwC3RJ dxwM2Mj2gCcniH43hzoeSCxhwpOSvu3Fwqj9bpBWQzWWynvepGBJJ8CCoJJmL7td qiy1k2QerJndIBKL9HKmyuKs9YnAn73ZwwgEcglSw== X-ME-Sender: Received: from intern.anarazel.de (104-2-144-147.lightspeed.sntcca.sbcglobal.net [104.2.144.147]) by mail.messagingengine.com (Postfix) with ESMTPA id D17EB7F96D for ; Wed, 11 Oct 2017 20:13:21 -0400 (EDT) Date: Wed, 11 Oct 2017 17:13:20 -0700 From: Andres Freund To: pgsql-committers@postgresql.org Subject: Re: pgsql: Add configure infrastructure to detect support for C99's restric Message-ID: <20171012001320.4putagiruuehtvb6@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org 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