This is the mail archive of the
mailing list for the glibc project.
[Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined
- From: "zackw at panix dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 03 Aug 2016 20:17:43 +0000
- Subject: [Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined
- Auto-submitted: auto-generated
- References: <firstname.lastname@example.org/bugzilla/>
--- Comment #6 from Zack Weinberg <zackw at panix dot com> ---
With g++ 5 or 6, the C++ library headers don't seem to use <cstdlib> very much
anymore, and in particular Shafik's original test case compiles without
It has been agreed that, in some future release, glibc's <sys/types.h> will
not include <sys/sysmacros.h> anymore. As of 2.25, it still does, but you get
deprecation warnings if you use the macros without including <sys/sysmacros.h>.
We have not decided exactly which future release will finally remove the
#include; to help us decide, please send reports of software that trips the
deprecation warnings to libc-alpha.
The warnings currently only happen if you use the macros in function-call
context; Shafik's test case, with `#include <cstdlib>` added, does _not_
trigger them, you still get the inexplicable errors. This will hopefully be
addressed in a follow-up patch before 2.25 is released.
You are receiving this mail because:
You are on the CC list for the bug.