[glibc] malloc: Fix mallinfo deprecation declaration

Florian Weimer fw@deneb.enyo.de
Mon Aug 31 19:16:00 GMT 2020


* 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.


More information about the Libc-alpha mailing list