This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 1/7] Fix __libc_signal_block_all on sparc64
On 11/12/2019 05:51, Andreas Schwab wrote:
> On Dez 10 2019, Adhemerval Zanella wrote:
>
>> @@ -53,15 +54,16 @@ __clear_internal_signals (sigset_t *set)
>> __sigdelset (set, SIGSETXID);
>> }
>>
>> -#define SIGALL_SET \
>> - ((__sigset_t) { .__val = {[0 ... _SIGSET_NWORDS-1 ] = -1 } })
>> +static const sigset_t sigall_set = {
>> + .__val = {[0 ... _SIGSET_NWORDS-1 ] = -1 }
>> +};
>
> Why do you need that static object? Doesn't it suffice to make the
> compound literal const?
It is a suggestion from Florian to use less stack usage since the
gcc with compound literal materialize the object on the stack; and
slight compat code on some architecture (where coping the compiler
create compound object might incur in a memcpy call).