Re: __attribute__ for non-gcc compilers

From: Oskari Saarenmaa <os(at)ohmu(dot)fi>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: __attribute__ for non-gcc compilers
Date: 2015-01-15 07:08:22
Message-ID: 54B76766.1070400@ohmu.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

15.01.2015, 00:54, Andres Freund kirjoitti:
> 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.

Good point, all attributes that actually change program behavior
(aligned and packed for now) need to error out during compilation if
they're used and they're not supported by the compiler.

Attributes which may improve optimization or just provide more
information for the developers (noreturn, unused, format) can be defined
empty when they're not supported (or are not supported well enough: GCC
< 3 doesn't know about %z in printf format.)

/ Oskari

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2015-01-15 07:15:39 EvalPlanQual behaves oddly for FDW queries involving system columns
Previous Message Michael Paquier 2015-01-15 07:05:33 Commit fest 2015-12 enters money time