Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq43N-0000lb-O7 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Aug 2018 22:14:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fq43L-0004Ai-Ix for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Aug 2018 22:14:07 +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.89) (envelope-from ) id 1fq43L-0004Ab-Bx for pgsql-hackers@lists.postgresql.org; Wed, 15 Aug 2018 22:14:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq43I-0005Rk-9P for pgsql-hackers@lists.postgresql.org; Wed, 15 Aug 2018 22:14:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7FMDxQM009878; Wed, 15 Aug 2018 18:13:59 -0400 From: Tom Lane To: Andres Freund cc: David Steele , pgsql-hackers@lists.postgresql.org Subject: Re: C99 compliance for src/port/snprintf.c In-reply-to: <20180815214931.vlwsz4s55enbppna@alap3.anarazel.de> References: <17245.1534289329@sss.pgh.pa.us> <9456.1534347706@sss.pgh.pa.us> <20180815155237.pz5fgfmdo4cgqjta@alap3.anarazel.de> <11138.1534349838@sss.pgh.pa.us> <20825.1534360737@sss.pgh.pa.us> <2069.1534363063@sss.pgh.pa.us> <20180815214931.vlwsz4s55enbppna@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 15 Aug 2018 14:49:31 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9876.1534371239.1@sss.pgh.pa.us> Date: Wed, 15 Aug 2018 18:13:59 -0400 Message-ID: <9877.1534371239@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-08-15 15:57:43 -0400, Tom Lane wrote: >> I'd always thought this was only in C++. This alone might be a sufficient >> reason to drop C89 compiler support ... > It's also IIRC reasonably widely supported from before C99. So, for the > sake of designated initializers, for loop scoping, snprintf, let's do > this in master? Nitpick: snprintf is an independent concern: that's from the C library, not from the compiler. To drive the point home, I could still test master on "gaur" if I were to install a just-slightly-newer gcc on that machine (its existing gcc installation isn't native either...); but replacing its libc is a nonstarter. Experimenting here says that even reasonably modern gcc's won't take declarations-inside-for without "--std=c99" or such. No idea about other compilers. So we'd have a little bit of work to do on configuration before we could open the floodgates on this. regards, tom lane