This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: gets with C++ and GCC before 4.7


On Fri, 9 Mar 2012, Roland McGrath wrote:

> > Should I then remove the __USE_GNU test from inside the C++ case?  That's 
> > fine with me.
> 
> I guess so, yes.

OK, I'm testing this patch.  It will make the configure tests added to 
libstdc++ unnecessary (but harmless, so it may be best not to remove them 
from 4.7 branch until after 4.7.0 is out).

2012-03-09  Joseph Myers  <joseph@codesourcery.com>

	[BZ #13566]
	* libio/stdio.h (gets): Always declare for C++ up to C++11 without
	checking __USE_GNU.

diff --git a/libio/stdio.h b/libio/stdio.h
index c69b382..9ca3ad3 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -623,7 +623,7 @@ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      __wur;
 
 #if !defined __USE_ISOC11 \
-    || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
+    || (defined __cplusplus && __cplusplus <= 201103L)
 /* Get a newline-terminated string from stdin, removing the newline.
    DO NOT USE THIS FUNCTION!!  There is no limit on how much it will read.
 

-- 
Joseph S. Myers
joseph@codesourcery.com


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