This is the mail archive of the
mailing list for the libstdc++ project.
Re: ::gets has not been declared
On 5 January 2012 18:24, Tom de Vries wrote:
> On 05/01/12 18:40, Jonathan Wakely wrote:
>> On 5 January 2012 16:33, Marc Glisse wrote:
>>> On Thu, 5 Jan 2012, Joseph S. Myers wrote:
>>>> If the final C++11 still requires gets in <cstdio>, despite it being
>>>> removed in C11, that's probably also a bug in C++11. ?(At least the most
>>>> recent draft I have to hand still has gets in <cstdio>.)
>>> It still has it. And it is based more on C99 than C11 (which didn't exist at
>>> the time), even if they did try to synchronize on some features.
>> Yep, it still requires it, this is a glibc bug.
>> Glibc should define gets if __cplusplus <= 201103L
> Filed http://sourceware.org/bugzilla/show_bug.cgi?id=13566 .
libstdc++ defines _GNU_SOURCE unconditionally, so if I read
libio/stdio.h correctly then gets() won't be defined even for C++03,
is that right?
Whatever your view on whether C++11 should include gets() or not,
C++03 definitely includes it.