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

From Oskari Saarenmaa
Subject Re: __attribute__ for non-gcc compilers
Date
Msg-id 54EAF9A6.1090903@ohmu.fi
Whole thread Raw
In response to Re: __attribute__ for non-gcc compilers  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
23.02.2015, 04:31, Robert Haas kirjoitti:
> On Tue, Feb 17, 2015 at 8:41 AM, Oskari Saarenmaa <os@ohmu.fi> wrote:
>> 15.01.2015, 21:58, Robert Haas kirjoitti:
>>> On Wed, Jan 14, 2015 at 5:54 PM, Andres Freund <andres@2ndquadrant.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.
>>
>> This is also included in the current commitfest,
>> https://commitfest.postgresql.org/4/115/
> 
> Is this going to play nicely with pgindent?

I ran pgindent on the tree with this patch applied (with a few changes,
pgindent modified atomics headers a bit) and the changes looked ok to
me, mostly pgindent just rewrapped lines like this:

-extern void quickdie(SIGNAL_ARGS) pg_attribute_noreturn;
+extern void
+quickdie(SIGNAL_ARGS) pg_attribute_noreturn;


but there were two cases where it produced a bit weird indentation:
#ifdef __arm__
-pg_attribute_packed                    /* Appropriate whack upside the
head for ARM */
+                       pg_attribute_packed /* Appropriate whack upside
the head for ARM */#endifItemPointerData;

and
void
-pg_attribute_noreturn
+                       pg_attribute_noreturnplpgsql_yyerror(const char *message){


/ Oskari



pgsql-hackers by date:

Previous
From: Rushabh Lathia
Date:
Subject: Re: pg_dump gets attributes from tables in extensions
Next
From: Andrew Gierth
Date:
Subject: Re: Abbreviated keys for Numeric