This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 14 Nov 2016 13:39:45 +0000
- Subject: [Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined
- Auto-submitted: auto-generated
- References: <bug-19239-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19239
--- Comment #11 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 809b72df6c90303aa3622a28f2837ec6c518290d (commit)
from 14f95a420313ee745b80fe71a0fe6f61b46b327c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=809b72df6c90303aa3622a28f2837ec6c518290d
commit 809b72df6c90303aa3622a28f2837ec6c518290d
Author: Zack Weinberg <zackw@panix.com>
Date: Mon Nov 14 08:34:59 2016 -0500
[BZ #19239] Issue deprecation warnings on macro expansion.
By using __glibc_macro_warning instead of __attribute_deprecated__,
we get the deprecation warnings whenever the macros are expanded,
not just when they compile to a function call. This is important
for unintentional uses like the test case in #19239 (C++ var(value)
initialization syntax, with a variable named "major"). It's also
simpler, because __REDIRECT is no longer required.
* misc/sys/sysmacros.h (__SYSMACROS_DM, __SYSMACROS_DM1): New macros.
(__SYSMACROS_DEPRECATION_MSG, __SYSMACROS_FST_DECL_TEMPL)
(__SYSMACROS_FST_IMPL_TEMPL): Delete.
(major, minor, makedev): Use __SYSMACROS_DM in definition, instead
of redirected function names.
* misc/sys/cdefs.h (__glibc_macro_warning): Activate for clang >= 3.5
as well. Document that MESSAGE must be a single string literal.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 11 +++++++++
misc/sys/cdefs.h | 7 ++++-
misc/sys/sysmacros.h | 56 ++++++++++++++++++++-----------------------------
3 files changed, 39 insertions(+), 35 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.