diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-30 18:28:53 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-30 18:28:53 +0000 |
commit | 5bb875df79a15cec7232da1834c01e2808805fcb (patch) | |
tree | 8511f47ee755991195e78dd04a9517d9681e2667 /libstdc++-v3/testsuite/27_io | |
parent | 2d5b538536465555c31f43c6bf78530dc483fcd5 (diff) | |
download | gcc-5bb875df79a15cec7232da1834c01e2808805fcb.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/27_io')
-rw-r--r-- | libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc b/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc new file mode 100644 index 00000000000..f9e5f86ed37 --- /dev/null +++ b/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc @@ -0,0 +1,25 @@ +// { dg-do compile { target c++14 } } + +// Copyright (C) 2007-2016 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <cstdio> + +namespace gnu +{ + using std::gets; // { dg-error "has not been declared" } +} |