mirror of git://gcc.gnu.org/git/gcc.git
PR libstdc++/79433 no #error for including TS headers with wrong -std
PR libstdc++/79433 * include/Makefile.am: Remove <bits/c++14_warning.h>. * include/Makefile.in: Regenerate. * include/bits/c++14_warning.h: Remove. * include/experimental/algorithm: Do not include <c++14_warning.h>. * include/experimental/any: Likewise. * include/experimental/array: Likewise. * include/experimental/bits/erase_if.h: Likewise. * include/experimental/bits/lfts_config.h: Likewise. * include/experimental/bits/shared_ptr.h: Likewise. * include/experimental/bits/string_view.tcc: Likewise. * include/experimental/chrono: Likewise. * include/experimental/deque: Likewise. * include/experimental/filesystem: Do not include <c++0x_warning.h>. * include/experimental/forward_list: Do not include <c++14_warning.h>. * include/experimental/functional: Likewise. * include/experimental/iterator: Likewise. * include/experimental/list: Likewise. * include/experimental/map: Likewise. * include/experimental/memory: Likewise. * include/experimental/numeric: Likewise. * include/experimental/optional: Likewise. * include/experimental/propagate_const: Likewise. * include/experimental/ratio: Likewise. * include/experimental/regex: Likewise. * include/experimental/set: Likewise. * include/experimental/string: Likewise. * include/experimental/string_view: Likewise. * include/experimental/system_error: Likewise. * include/experimental/tuple: Likewise. * include/experimental/type_traits: Likewise. * include/experimental/unordered_map: Likewise. * include/experimental/unordered_set: Likewise. * include/experimental/vector: Likewise. * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error line number. * testsuite/experimental/array/neg.cc: Likewise. * testsuite/experimental/propagate_const/assignment/move_neg.cc: Likewise. * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise. * testsuite/experimental/propagate_const/requirements2.cc: Likewise. * testsuite/experimental/propagate_const/requirements3.cc: Likewise. * testsuite/experimental/propagate_const/requirements4.cc: Likewise. * testsuite/experimental/propagate_const/requirements5.cc: Likewise. From-SVN: r252019
This commit is contained in:
parent
c6888c6257
commit
d681026df1
|
|
@ -1,5 +1,50 @@
|
|||
2017-09-12 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/79433
|
||||
* include/Makefile.am: Remove <bits/c++14_warning.h>.
|
||||
* include/Makefile.in: Regenerate.
|
||||
* include/bits/c++14_warning.h: Remove.
|
||||
* include/experimental/algorithm: Do not include <c++14_warning.h>.
|
||||
* include/experimental/any: Likewise.
|
||||
* include/experimental/array: Likewise.
|
||||
* include/experimental/bits/erase_if.h: Likewise.
|
||||
* include/experimental/bits/lfts_config.h: Likewise.
|
||||
* include/experimental/bits/shared_ptr.h: Likewise.
|
||||
* include/experimental/bits/string_view.tcc: Likewise.
|
||||
* include/experimental/chrono: Likewise.
|
||||
* include/experimental/deque: Likewise.
|
||||
* include/experimental/filesystem: Do not include <c++0x_warning.h>.
|
||||
* include/experimental/forward_list: Do not include <c++14_warning.h>.
|
||||
* include/experimental/functional: Likewise.
|
||||
* include/experimental/iterator: Likewise.
|
||||
* include/experimental/list: Likewise.
|
||||
* include/experimental/map: Likewise.
|
||||
* include/experimental/memory: Likewise.
|
||||
* include/experimental/numeric: Likewise.
|
||||
* include/experimental/optional: Likewise.
|
||||
* include/experimental/propagate_const: Likewise.
|
||||
* include/experimental/ratio: Likewise.
|
||||
* include/experimental/regex: Likewise.
|
||||
* include/experimental/set: Likewise.
|
||||
* include/experimental/string: Likewise.
|
||||
* include/experimental/string_view: Likewise.
|
||||
* include/experimental/system_error: Likewise.
|
||||
* include/experimental/tuple: Likewise.
|
||||
* include/experimental/type_traits: Likewise.
|
||||
* include/experimental/unordered_map: Likewise.
|
||||
* include/experimental/unordered_set: Likewise.
|
||||
* include/experimental/vector: Likewise.
|
||||
* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error
|
||||
line number.
|
||||
* testsuite/experimental/array/neg.cc: Likewise.
|
||||
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
|
||||
Likewise.
|
||||
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
|
||||
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
|
||||
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
|
||||
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
|
||||
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
|
||||
|
||||
PR libstdc++/79433
|
||||
* doc/xml/manual/status_cxx2017.xml: Update feature-test macros.
|
||||
* doc/html/*: Regenerate.
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ bits_headers = \
|
|||
${bits_srcdir}/basic_string.tcc \
|
||||
${bits_srcdir}/boost_concept_check.h \
|
||||
${bits_srcdir}/c++0x_warning.h \
|
||||
${bits_srcdir}/c++14_warning.h \
|
||||
${bits_srcdir}/char_traits.h \
|
||||
${bits_srcdir}/codecvt.h \
|
||||
${bits_srcdir}/concept_check.h \
|
||||
|
|
|
|||
|
|
@ -388,7 +388,6 @@ bits_headers = \
|
|||
${bits_srcdir}/basic_string.tcc \
|
||||
${bits_srcdir}/boost_concept_check.h \
|
||||
${bits_srcdir}/c++0x_warning.h \
|
||||
${bits_srcdir}/c++14_warning.h \
|
||||
${bits_srcdir}/char_traits.h \
|
||||
${bits_srcdir}/codecvt.h \
|
||||
${bits_srcdir}/concept_check.h \
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
// Copyright (C) 2013-2017 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.
|
||||
|
||||
// Under Section 7 of GPL version 3, you are granted additional
|
||||
// permissions described in the GCC Runtime Library Exception, version
|
||||
// 3.1, as published by the Free Software Foundation.
|
||||
|
||||
// You should have received a copy of the GNU General Public License and
|
||||
// a copy of the GCC Runtime Library Exception along with this program;
|
||||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
/** @file bits/c++14_warning.h
|
||||
* This is an internal header file, included by other library headers.
|
||||
* Do not attempt to use it directly. @headername{iosfwd}
|
||||
*/
|
||||
|
||||
#ifndef _CXX14_WARNING_H
|
||||
#define _CXX14_WARNING_H 1
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
#error This file requires compiler and library support \
|
||||
for the ISO C++ 2014 standard. This support must be enabled \
|
||||
with the -std=c++14 or -std=gnu++14 compiler options.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <algorithm>
|
||||
#include <experimental/bits/lfts_config.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <typeinfo>
|
||||
#include <new>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <array>
|
||||
#include <experimental/type_traits>
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
#include <experimental/bits/lfts_config.h>
|
||||
|
||||
namespace std
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@
|
|||
* Do not attempt to use it directly.
|
||||
*/
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
#include <bits/c++config.h>
|
||||
|
||||
#if _GLIBCXX_INLINE_VERSION
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <memory>
|
||||
#include <experimental/type_traits>
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <chrono>
|
||||
#include <experimental/bits/lfts_config.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <deque>
|
||||
#include <algorithm>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
# include <bits/c++0x_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201103L
|
||||
|
||||
#include <experimental/bits/fs_fwd.h>
|
||||
#include <experimental/bits/fs_path.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <forward_list>
|
||||
#include <experimental/memory_resource>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <iterator>
|
||||
#include <iosfwd>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <list>
|
||||
#include <experimental/memory_resource>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <map>
|
||||
#include <experimental/bits/erase_if.h>
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <numeric>
|
||||
#include <experimental/type_traits>
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@
|
|||
* between different GCC releases </STRONG> for these features.
|
||||
*/
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <type_traits>
|
||||
#include <bits/functional_hash.h>
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <ratio>
|
||||
#include <experimental/bits/lfts_config.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <regex>
|
||||
#include <experimental/string>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <set>
|
||||
#include <experimental/bits/erase_if.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <string>
|
||||
#include <limits>
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <system_error>
|
||||
#include <experimental/bits/lfts_config.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <tuple>
|
||||
#include <bits/invoke.h>
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <type_traits>
|
||||
#include <experimental/bits/lfts_config.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <unordered_map>
|
||||
#include <experimental/bits/erase_if.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <unordered_set>
|
||||
#include <experimental/bits/erase_if.h>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#pragma GCC system_header
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
# include <bits/c++14_warning.h>
|
||||
#else
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ void test01()
|
|||
using std::experimental::any_cast;
|
||||
|
||||
const any y(1);
|
||||
any_cast<int&>(y); // { dg-error "qualifiers" "" { target { *-*-* } } 359 }
|
||||
any_cast<int&>(y); // { dg-error "qualifiers" "" { target { *-*-* } } 357 }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ int main()
|
|||
{
|
||||
int dummy;
|
||||
auto bad = std::experimental::make_array(std::ref(dummy));
|
||||
// { dg-error "explicit target type" "" { target *-*-* } 78 }
|
||||
// { dg-error "explicit target type" "" { target *-*-* } 76 }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
using std::experimental::propagate_const;
|
||||
using std::unique_ptr;
|
||||
|
||||
// { dg-error "no type" "" { target *-*-* } 162 }
|
||||
// { dg-error "no type" "" { target *-*-* } 160 }
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@
|
|||
using std::experimental::propagate_const;
|
||||
using std::unique_ptr;
|
||||
|
||||
// { dg-error "no type" "" { target *-*-* } 120 }
|
||||
// { dg-error "no type" "" { target *-*-* } 127 }
|
||||
// { dg-error "no type" "" { target *-*-* } 136 }
|
||||
// { dg-error "no type" "" { target *-*-* } 145 }
|
||||
// { dg-error "no type" "" { target *-*-* } 118 }
|
||||
// { dg-error "no type" "" { target *-*-* } 125 }
|
||||
// { dg-error "no type" "" { target *-*-* } 134 }
|
||||
// { dg-error "no type" "" { target *-*-* } 143 }
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
|
||||
using std::experimental::propagate_const;
|
||||
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 }
|
||||
// { dg-error "not a pointer-to-object type" "" { target *-*-* } 68 }
|
||||
// { dg-error "forming pointer to reference type" "" { target *-*-* } 189 }
|
||||
// { dg-error "forming pointer to reference type" "" { target *-*-* } 215 }
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
|
||||
// { dg-error "not a pointer-to-object type" "" { target *-*-* } 66 }
|
||||
// { dg-error "forming pointer to reference type" "" { target *-*-* } 187 }
|
||||
// { dg-error "forming pointer to reference type" "" { target *-*-* } 213 }
|
||||
|
||||
propagate_const<void*> test1;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
|
||||
using std::experimental::propagate_const;
|
||||
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 }
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
|
||||
|
||||
propagate_const<void (*)()> test1;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
using std::experimental::propagate_const;
|
||||
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 }
|
||||
// { dg-error "invalid type" "" { target *-*-* } 68 }
|
||||
// { dg-error "uninitialized reference member" "" { target *-*-* } 114 }
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
|
||||
// { dg-error "invalid type" "" { target *-*-* } 66 }
|
||||
// { dg-error "uninitialized reference member" "" { target *-*-* } 112 }
|
||||
|
||||
propagate_const<int&> test1; // { dg-error "use of deleted function" }
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
|
||||
using std::experimental::propagate_const;
|
||||
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 }
|
||||
// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
|
||||
|
||||
propagate_const<int[1]> test1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue