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
On Fri, 9 Mar 2012, Roland McGrath wrote:
> I do generally agree with the principle of not rendering things broken.
> But sometimes it is better for things to be broken for a little while than
> to have a band-aid fix go in and risk the proper fix being dropped on the
> floor because the immediate pain point has been eased. Moreover, I really
> consider anything involving C++ far less critical that an issue like
> building libc itself being broken.
This breaks integration testing of current GCC, glibc, binutils etc.
together. We shouldn't leave that broken for two months.
> I agree with Ulrich about the right answer being for newer GCC to predefine
> a specific symbol about this, e.g. __cplusplus_no_gets. Then anyone doing
> backports of the relevant libstdc++ work can add this predefine to their
> backport GCC version, though they cannot change its __GNUC_MINOR__ value.
(libstdc++ list added to CC:.)
As I understand it, the libstdc++ maintainers would prefer to have gets
declarations for C++ up to and including C++11, following the C++
standard, and only disable the declaration in a future C++17 mode. That
is, the state immediately after my commit
8ecd6b2a1283a28bcf56cfe48099fafa412a3929 would be preferable to them, and
from their point of view no such macro would need to be defined because
C++17 mode would use a newer __cplusplus value to disable the declaration.
--
Joseph S. Myers
joseph@codesourcery.com