[PATCH v5 12/13] string: Add sigabbrev_np and sigdescr_np

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Jul 8 12:23:31 GMT 2020


Thanks for catching it, the oldest gcc I tested it was 7.5.

On 08/07/2020 09:16, Tamar Christina wrote:
> Hi Florian,
> 
> Yup, that patch works.
> 
> Thanks!
> Tamar
> 
>> -----Original Message-----
>> From: Florian Weimer <fweimer@redhat.com>
>> Sent: Wednesday, July 8, 2020 12:52 PM
>> To: Tamar Christina <Tamar.Christina@arm.com>
>> Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>; Carlos O'Donell
>> <carlos@redhat.com>; libc-alpha@sourceware.org
>> Subject: Re: [PATCH v5 12/13] string: Add sigabbrev_np and sigdescr_np
>>
>> * Tamar Christina:
>>
>>>> What's your GCC version?  I don't see this when building with a GCC
>>>> 10 cross- compiler.
>>>
>>> It seems to be GCC 6.3 from a native Debian docker image
>>>
>>> 0e188cdeda88 ~# gcc --version
>>> ...
>>> gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ...
>>>
>>> 0e188cdeda88 ~# lsb_release -a
>>> No LSB modules are available.
>>> Distributor ID: Debian
>>> Description:    Debian GNU/Linux 9.12 (stretch)
>>> Release:        9.12
>>> Codename:       stretch
>>
>> I see.  Looks like GCC 6 does not discard the const on the return type,
>> although it has no effect in C:
>>
>> const char *const
>> sigabbrev_np (int signum)
>> {
>>>>
>> Does this patch fixes things for you?
>>
>> diff --git a/string/sigabbrev_np.c b/string/sigabbrev_np.c index
>> 3cbe14e769..a5ac6da053 100644
>> --- a/string/sigabbrev_np.c
>> +++ b/string/sigabbrev_np.c
>> @@ -20,7 +20,7 @@
>>  #include <signal.h>
>>  #include <array_length.h>
>>
>> -const char *const
>> +const char *
>>  sigabbrev_np (int signum)
>>  {
>>    const char *abbrev = NULL;
>> diff --git a/string/sigdescr_np.c b/string/sigdescr_np.c index
>> 5bcf814c1d..bf2d462b9c 100644
>> --- a/string/sigdescr_np.c
>> +++ b/string/sigdescr_np.c
>> @@ -20,7 +20,7 @@
>>  #include <signal.h>
>>  #include <array_length.h>
>>
>> -const char *const
>> +const char *
>>  __sigdescr_np (int signum)
>>  {
>>    const char *descr = NULL;
>>
>>
>> Thanks,
>> Florian
> 


More information about the Libc-alpha mailing list