Re: __attribute__ for non-gcc compilers - Mailing list pgsql-hackers

From Oskari Saarenmaa
Subject Re: __attribute__ for non-gcc compilers
Date
Msg-id 54B76766.1070400@ohmu.fi
Whole thread Raw
In response to Re: __attribute__ for non-gcc compilers  (Andres Freund <andres@2ndquadrant.com>)
List 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




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Commit fest 2015-12 enters money time
Next
From: Etsuro Fujita
Date:
Subject: EvalPlanQual behaves oddly for FDW queries involving system columns