Re: __attribute__ for non-gcc compilers

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Oskari Saarenmaa <os(at)ohmu(dot)fi>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: __attribute__ for non-gcc compilers
Date: 2015-02-17 13:46:06
Message-ID: 20150217134606.GC2895@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-02-17 15:41:45 +0200, Oskari Saarenmaa wrote:
> 15.01.2015, 21:58, Robert Haas kirjoitti:
> > On Wed, Jan 14, 2015 at 5:54 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> >> I think I'd for now simply not define pg_attribute_aligned() on
> >> platforms where it's not supported, instead of defining it empty. If we
> >> need a softer variant we can name it pg_attribute_aligned_if_possible or
> >> something.
> >>
> >> Sounds sane?
> >
> > Yes, that sounds like a much better plan.
>
> Attached an updated patch rebased on today's git master that never
> defines aligned or packed empty.

Cool, that looks good. Besides allowing other compilers to use the
__attribute__ stuff, it also seems like a readability win to
me. Especially the various printf stuff looks much better to me this
way.

I guess you've tested this on solaris and x86 linux?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2015-02-17 13:58:49 Re: pgaudit - an auditing extension for PostgreSQL
Previous Message Michael Paquier 2015-02-17 13:44:47 Re: Bug in pg_dump