This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70253] New: gets() c++14
- From: "lonewohlf42 at cogeco dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2016 07:37:00 +0000
- Subject: [Bug c++/70253] New: gets() c++14
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70253
Bug ID: 70253
Summary: gets() c++14
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: lonewohlf42 at cogeco dot ca
Target Milestone: ---
when legacy code
#include <stdio.h>
int main()
{
char s1[10];
gets(s1);
...
}
is compiled using C++14 compiler switch on Linux Ubuntu 15.10 using
Code::blocks
IDE 16.01.
The compiler gives error Stating:
error: gets was not declared in this scope.
if compiled using C++98 or C++11 compiler switch, code works fine.
I know function gets() is deprecated.