Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Date
Msg-id 20191021181319.GW6962@tamriel.snowman.net
Whole thread Raw
In response to Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays  ("Joe Nelson" <joe@begriffs.com>)
Responses Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Greetings,

* Joe Nelson (joe@begriffs.com) wrote:
> > Is it possible to define the macro to be {} where supported and {0}
> > where needed? Something like:
>
> If it's being put behind a macro then *stylistically* it shouldn't
> matter whether {} or {0} is chosen, right? In which case {0} would
> be a better choice because it's supported everywhere.

The problem with {0} in the first place is that it doesn't actually work
in all cases...  Simple cases, yes, but not more complex ones.  It's
unfortunate that there isn't a general solution here that works across
platforms (even if it involved macros..), but that seems to be the case.

Thanks,

Stephen

Attachment

pgsql-hackers by date:

Previous
From: "Joe Nelson"
Date:
Subject: Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays
Next
From: Tom Lane
Date:
Subject: Re: intermittent test failure on Windows