public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Re: [glibc] malloc: Fix mallinfo deprecation declaration
       [not found] <20200831174358.EB7E43959E59@sourceware.org>
@ 2020-08-31 18:28 ` Florian Weimer
  2020-08-31 19:13   ` Adhemerval Zanella
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2020-08-31 18:28 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha

* Adhemerval Zanella via Glibc-cvs:

> +  /* The test below covers the deprecated mallinfo function.  */
> +  DIAG_PUSH_NEEDS_COMMENT;
> +  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");

This should be 10 or 11, not 4.9.  The ignored diagnostics is required
for current compilers, and will always be.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [glibc] malloc: Fix mallinfo deprecation declaration
  2020-08-31 18:28 ` [glibc] malloc: Fix mallinfo deprecation declaration Florian Weimer
@ 2020-08-31 19:13   ` Adhemerval Zanella
  2020-08-31 19:16     ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Adhemerval Zanella @ 2020-08-31 19:13 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha



On 31/08/2020 15:28, Florian Weimer wrote:
> * Adhemerval Zanella via Glibc-cvs:
> 
>> +  /* The test below covers the deprecated mallinfo function.  */
>> +  DIAG_PUSH_NEEDS_COMMENT;
>> +  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
> 
> This should be 10 or 11, not 4.9.  The ignored diagnostics is required
> for current compilers, and will always be.
> 

I saw the deprecated warning on gcc 9.2.1 and thus I used the gcc version
used on some other usages of the same ignore:

  posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
  posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
  signal/tst-sigset2.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
  signal/tst-sigsimple.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
  stdio-common/tst-printfsz.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
  sysdeps/pthread/tst-cancel4.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
  time/tst-ftime.c:      DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");

This is essentially for __attribute_deprecated__, I am failing to see why this
will only happen with gcc 10 or 11.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [glibc] malloc: Fix mallinfo deprecation declaration
  2020-08-31 19:13   ` Adhemerval Zanella
@ 2020-08-31 19:16     ` Florian Weimer
  2020-08-31 19:50       ` Adhemerval Zanella
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2020-08-31 19:16 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha

* Adhemerval Zanella:

> On 31/08/2020 15:28, Florian Weimer wrote:
>> * Adhemerval Zanella via Glibc-cvs:
>> 
>>> +  /* The test below covers the deprecated mallinfo function.  */
>>> +  DIAG_PUSH_NEEDS_COMMENT;
>>> +  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>> 
>> This should be 10 or 11, not 4.9.  The ignored diagnostics is required
>> for current compilers, and will always be.
>> 
>
> I saw the deprecated warning on gcc 9.2.1 and thus I used the gcc version
> used on some other usages of the same ignore:
>
>   posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>   posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>   signal/tst-sigset2.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>   signal/tst-sigsimple.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>   stdio-common/tst-printfsz.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>   sysdeps/pthread/tst-cancel4.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>   time/tst-ftime.c:      DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>
> This is essentially for __attribute_deprecated__, I am failing to see why this
> will only happen with gcc 10 or 11.

The is supposed to refer to the last compiler version that was
verified to need the pragma.  The idea is to revisit those directives
periodically and remove them once the compilers that need them are no
longer supported for building glibc.

That does not apply to any of these cases.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [glibc] malloc: Fix mallinfo deprecation declaration
  2020-08-31 19:16     ` Florian Weimer
@ 2020-08-31 19:50       ` Adhemerval Zanella
  2020-08-31 19:54         ` Adhemerval Zanella
  0 siblings, 1 reply; 5+ messages in thread
From: Adhemerval Zanella @ 2020-08-31 19:50 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha



On 31/08/2020 16:16, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> On 31/08/2020 15:28, Florian Weimer wrote:
>>> * Adhemerval Zanella via Glibc-cvs:
>>>
>>>> +  /* The test below covers the deprecated mallinfo function.  */
>>>> +  DIAG_PUSH_NEEDS_COMMENT;
>>>> +  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>
>>> This should be 10 or 11, not 4.9.  The ignored diagnostics is required
>>> for current compilers, and will always be.
>>>
>>
>> I saw the deprecated warning on gcc 9.2.1 and thus I used the gcc version
>> used on some other usages of the same ignore:
>>
>>   posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>   posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>   signal/tst-sigset2.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>   signal/tst-sigsimple.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>   stdio-common/tst-printfsz.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>   sysdeps/pthread/tst-cancel4.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>   time/tst-ftime.c:      DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>
>> This is essentially for __attribute_deprecated__, I am failing to see why this
>> will only happen with gcc 10 or 11.
> 
> The is supposed to refer to the last compiler version that was
> verified to need the pragma.  The idea is to revisit those directives
> periodically and remove them once the compilers that need them are no
> longer supported for building glibc.
> 
> That does not apply to any of these cases.
> 

Yes and the deprecated warning also does really fit in the category you
described since it is defined by glibc itself.  I give you that '4.9' indeed
is not the best choise (although not wrong itself), but for this particular
case I think using the minimum support version version gcc required to 
build itself make more sense.

Maybe a best alternative is to define the minimum compiler version on
libc-diag.h and use it on "-Wdeprecated-declarations" instead.  I guess the
SELinux deprecated-declarations usage which are constraint for gcc 10 are
not entirely correct as well.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [glibc] malloc: Fix mallinfo deprecation declaration
  2020-08-31 19:50       ` Adhemerval Zanella
@ 2020-08-31 19:54         ` Adhemerval Zanella
  0 siblings, 0 replies; 5+ messages in thread
From: Adhemerval Zanella @ 2020-08-31 19:54 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha



On 31/08/2020 16:50, Adhemerval Zanella wrote:
> 
> 
> On 31/08/2020 16:16, Florian Weimer wrote:
>> * Adhemerval Zanella:
>>
>>> On 31/08/2020 15:28, Florian Weimer wrote:
>>>> * Adhemerval Zanella via Glibc-cvs:
>>>>
>>>>> +  /* The test below covers the deprecated mallinfo function.  */
>>>>> +  DIAG_PUSH_NEEDS_COMMENT;
>>>>> +  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>>
>>>> This should be 10 or 11, not 4.9.  The ignored diagnostics is required
>>>> for current compilers, and will always be.
>>>>
>>>
>>> I saw the deprecated warning on gcc 9.2.1 and thus I used the gcc version
>>> used on some other usages of the same ignore:
>>>
>>>   posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>   posix/tst-dir.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>   signal/tst-sigset2.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>   signal/tst-sigsimple.c:DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>   stdio-common/tst-printfsz.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>   sysdeps/pthread/tst-cancel4.c:  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>   time/tst-ftime.c:      DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>>>
>>> This is essentially for __attribute_deprecated__, I am failing to see why this
>>> will only happen with gcc 10 or 11.
>>
>> The is supposed to refer to the last compiler version that was
>> verified to need the pragma.  The idea is to revisit those directives
>> periodically and remove them once the compilers that need them are no
>> longer supported for building glibc.
>>
>> That does not apply to any of these cases.
>>
> 
> Yes and the deprecated warning also does really fit in the category you
> described since it is defined by glibc itself.  I give you that '4.9' indeed
> is not the best choise (although not wrong itself), but for this particular
> case I think using the minimum support version version gcc required to 
> build itself make more sense.

I should revise what I wrote more often... I mean that 'using the minimum
supported gcc version to build glibc itself makes more sense'.

> 
> Maybe a best alternative is to define the minimum compiler version on
> libc-diag.h and use it on "-Wdeprecated-declarations" instead.  I guess the
> SELinux deprecated-declarations usage which are constraint for gcc 10 are
> not entirely correct as well.
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-31 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200831174358.EB7E43959E59@sourceware.org>
2020-08-31 18:28 ` [glibc] malloc: Fix mallinfo deprecation declaration Florian Weimer
2020-08-31 19:13   ` Adhemerval Zanella
2020-08-31 19:16     ` Florian Weimer
2020-08-31 19:50       ` Adhemerval Zanella
2020-08-31 19:54         ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).