aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2016-09-30 19:28:53 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2016-09-30 19:28:53 +0100
commit36105dbdab0fe4a20682d6d8efc6da7fceccef07 (patch)
tree8511f47ee755991195e78dd04a9517d9681e2667 /libstdc++-v3/include
parentb2861325a9bd0760aa921c0b76554785a9d2a46b (diff)
downloadgcc-36105dbdab0fe4a20682d6d8efc6da7fceccef07.zip
gcc-36105dbdab0fe4a20682d6d8efc6da7fceccef07.tar.gz
gcc-36105dbdab0fe4a20682d6d8efc6da7fceccef07.tar.bz2
libstdc++/77795 Only declare ::gets for C++98 and C++11
PR libstdc++/77795 * acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): Use -std=gnu++11 to check for gets. * config.h.in: Regenerate. * configure: Regenerate. * include/c_global/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Only declare for C++98 and C++11. * include/c_std/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Likewise. * testsuite/27_io/headers/cstdio/functions_neg.cc: New test. From-SVN: r240672
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/c_global/cstdio2
-rw-r--r--libstdc++-v3/include/c_std/cstdio2
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio
index 920d109..86d524f 100644
--- a/libstdc++-v3/include/c_global/cstdio
+++ b/libstdc++-v3/include/c_global/cstdio
@@ -44,7 +44,7 @@
#ifndef _GLIBCXX_CSTDIO
#define _GLIBCXX_CSTDIO 1
-#ifndef _GLIBCXX_HAVE_GETS
+#if __cplusplus <= 201103L && !defined(_GLIBCXX_HAVE_GETS)
extern "C" char* gets (char* __s) __attribute__((__deprecated__));
#endif
diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
index a4119ba..549004c 100644
--- a/libstdc++-v3/include/c_std/cstdio
+++ b/libstdc++-v3/include/c_std/cstdio
@@ -44,7 +44,7 @@
#include <bits/c++config.h>
#include <stdio.h>
-#ifndef _GLIBCXX_HAVE_GETS
+#if __cplusplus <= 201103L && !defined(_GLIBCXX_HAVE_GETS)
extern "C" char* gets (char* __s) __attribute__((__deprecated__));
#endif