With this change:
* libio/stdio.h: Do not declare gets for ISO C11 and _GNU_SOURCE.
gets is no longer defined for C++11, while it should be. This causes breakage when building libstdc++. See also discussion at http://gcc.gnu.org/ml/gcc/2012-01/msg00041.html .
(In reply to comment #0)
> http://gcc.gnu.org/ml/gcc/2012-01/msg00041.html .
That build failure is in C++03 code, not C++11
gets() needs to be defined for C++ even when _GNU_SOURCE is defined.
I suggest checking whether __cplusplus <= 201103L
Fixed in commit 8ecd6b2a1283a28bcf56cfe48099fafa412a3929.
...And un-fixed in this commit, a day later:
Looks like either that needs to be rolled back, or gcc needs to be changed to not define _GNU_SOURCE. (But I bet that latter change will break lots more stuff in libstdc++...)
related gcc bug:
Bug 51785 - gets not anymore declared
Well, I'll let the gcc and glibc people figure out what to do here. Nothing has been released with these changes yet (at least not AFAIK), so it's only hitting people trying to use head versions, which isn't many.
GCC was fixed for 4.7. glibc patch for GCC <= 4.6 pending review: http://sourceware.org/ml/libc-alpha/2012-03/msg00111.html
Fixed, again, by removing the __USE_GNU conditional after further discussion on libc-alpha.