On Tue, Jan 13, 2015 at 4:18 PM, Oskari Saarenmaa <o...@ohmu.fi> wrote:
> Commit db4ec2ffce35 added alignment attributes for 64-bit atomic
> variables as required on 32-bit platforms using
> __attribute__((aligned(8)).  That works fine with GCC, and would work
> with Solaris Studio Compiler [1] and IBM XL C [2], but src/include/c.h
> defines __attribute__ as an empty macro when not using GCC.
> Unfortunately we can't just disable that #define and enable all
> __attributes__ for Solaris CC and XLC as we use a bunch of attributes
> that are not supported by those compilers and using them unconditionally
> would generate a lot of warnings.
>
> Attached a patch that defines custom macros for each attribute and
> enables them individually for compilers that support them and never
> defines __attribute__.
>
> I have tested this with GCC 4.9.2 on Linux x86-64 and Solaris CC 5.12 on
> Sparc (32-bit build); I don't have access to an IBM box with XLC.

I guess my first question is whether we want to be relying on
__attribute__((aligned)) in the first place.  If we do, then this
seems like a pretty sensible and necessary change.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to