This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: gets with C++ and GCC before 4.7
- From: Ulrich Drepper <drepper at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 6 Mar 2012 18:07:37 -0500
- Subject: Re: gets with C++ and GCC before 4.7
- Authentication-results: mr.google.com; spf=pass (google.com: domain of drepper@gmail.com designates 10.182.36.99 as permitted sender) smtp.mail=drepper@gmail.com; dkim=pass header.i=drepper@gmail.com
- References: <Pine.LNX.4.64.1203052335580.17538@digraph.polyomino.org.uk>
On Mon, Mar 5, 2012 at 18:38, Joseph S. Myers <joseph@codesourcery.com> wrote:
> Â#if !defined __USE_ISOC11 \
> - Â Â|| (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
> + Â Â|| (defined __cplusplus && __cplusplus <= 201103L \
> + Â Â Â && (!defined __USE_GNU || (defined __GNUC__ && !__GNUC_PREREQ (4, 7))))
This is just wrong. It means people who backport gcc fixes would have
to fix up headers as well.
As I said in the gcc bug, gcc should define a macro if the declaration
is needed and this macro should be defined only when absolutely
necessary.