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

From Thomas Munro
Subject Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Date
Msg-id CA+hUKGJq5mO7dLhtc-BL9C373P76uAB0i55cxGJ7oFOsWMJkHg@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Wed, Oct 2, 2019 at 5:49 AM Andres Freund <andres@anarazel.de> wrote:
> On 2019-10-01 12:17:08 -0400, Tom Lane wrote:
> > Note though that InsertPgAttributeTuple uses memset(), while some of
> > these other places use MemSet().  The code I see being generated for
> > MemSet() is also the same(!) on clang, but it is different and
> > probably worse on gcc.  I wonder if it isn't time to kick MemSet to
> > the curb.  We have not re-evaluated that macro in more than a dozen
> > years, and compilers have surely changed.
>
> Yes, we really should!

+1

FWIW I experimented with that over here:

https://www.postgresql.org/message-id/CA%2BhUKGLfa6ANa0vs7Lf0op0XBH05HE8SyX8NFhDyT7k2CHYLXw%40mail.gmail.com



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Next
From: Tom Lane
Date:
Subject: Re: Modest proposal for making bpchar less inconsistent