diff options
author | Jason Merrill <jason@redhat.com> | 2019-12-17 16:45:19 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2019-12-17 16:45:19 -0500 |
commit | 490a091fa7397e34b04e72634c3d37d8a4e223a4 (patch) | |
tree | cc1bf2649a7f3dcd156f1d3ae1a8f2fd2891f731 | |
parent | 775670d792fb8ff314ed519ff295583ab31d90ef (diff) | |
download | gcc-490a091fa7397e34b04e72634c3d37d8a4e223a4.zip gcc-490a091fa7397e34b04e72634c3d37d8a4e223a4.tar.gz gcc-490a091fa7397e34b04e72634c3d37d8a4e223a4.tar.bz2 |
* name-lookup.c (get_std_name_hint): Add std::byte.
From-SVN: r279471
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/missing-std-include-9.C | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6b5849e..e8a94f4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2019-12-17 Jason Merrill <jason@redhat.com> + + * name-lookup.c (get_std_name_hint): Add std::byte. + 2019-12-17 Jakub Jelinek <jakub@redhat.com> PR c++/59655 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index e64cd9a..181dad0 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -5641,6 +5641,8 @@ get_std_name_hint (const char *name) /* <condition_variable>. */ {"condition_variable", "<condition_variable>", cxx11}, {"condition_variable_any", "<condition_variable>", cxx11}, + /* <cstddef>. */ + {"byte", "<cstddef>", cxx17}, /* <deque>. */ {"deque", "<deque>", cxx98}, /* <forward_list>. */ diff --git a/gcc/testsuite/g++.dg/lookup/missing-std-include-9.C b/gcc/testsuite/g++.dg/lookup/missing-std-include-9.C new file mode 100644 index 0000000..f8e1e1d --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/missing-std-include-9.C @@ -0,0 +1,3 @@ +std::byte b; // { dg-error "byte" } +// { dg-message "cstddef" "" { target c++17 } .-1 } +// { dg-message "C..17" "" { target c++14_down } .-2 } |