pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: David Steele <david@pgmasters.net>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: C99 compliance for src/port/snprintf.c
Date: Wed, 15 Aug 2018 18:13:59 -0400
Message-ID: <9877.1534371239@sss.pgh.pa.us> (raw)
In-Reply-To: <20180815214931.vlwsz4s55enbppna@alap3.anarazel.de>
References: <17245.1534289329@sss.pgh.pa.us>
	<CA+TgmoaanyYh9KG49yWdhzU72Ngh7XG5Gs9rtceQfBg6WFaybA@mail.gmail.com>
	<9456.1534347706@sss.pgh.pa.us>
	<20180815155237.pz5fgfmdo4cgqjta@alap3.anarazel.de>
	<CA+TgmoYvHzFkwChsamwbBrLNJRcRq+fyTwveFaN_YOWUsRnfpw@mail.gmail.com>
	<11138.1534349838@sss.pgh.pa.us>
	<dd48e765-9afe-4695-b2f4-f3cc0c1218e0@2ndQuadrant.com>
	<20825.1534360737@sss.pgh.pa.us>
	<e452e970-cf80-6e7e-17c1-24730a5c9ca9@pgmasters.net>
	<2069.1534363063@sss.pgh.pa.us>
	<20180815214931.vlwsz4s55enbppna@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> 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




view thread (46+ messages)  latest in thread

Message-ID: <9877.1534371239@sss.pgh.pa.us>
Permalink:  ../9877.1534371239@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9877.1534371239@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, david@pgmasters.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: C99 compliance for src/port/snprintf.c
  In-Reply-To: <9877.1534371239@sss.pgh.pa.us>

* 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