This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: malloc: performance improvements and bugfixes


On 01/26/2016 02:24 PM, Florian Weimer wrote:
But this file does not use any of the deprecated (or
soon-to-be-deprecated) identifiers.

The deprecation warnings I'm talking about are not #warning directives
in the header file.  You only get them if you use the very identifiers
annotated with deprecation warnings (or if you use a preprocessor macro
that is subject to a warning hack).

Thanks, I see now. However, GCC does not issue the deprecation warning even if the hook is used, so long as the hook is initialized the way that Emacs does it. (Emacs must initialize the hook statically because the initialization must take effect before 'main' is called.) So, for example, if I compile the attached program on Fedora 23 with GCC, the program compiles and runs without complaint.

The failure to warn is arguably a GCC bug. It's a blessing in disguise for Emacs, as I don't want the deprecation warning there anyway.

I plan to install something into Emacs that includes <malloc.h> before initializing the hook, though, as that's just standard hygiene. Perhaps some day GCC will issue the warning you want....

Attachment: t.c
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]