]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* name-lookup.c (get_std_name_hint): Add std::byte.
authorJason Merrill <jason@redhat.com>
Tue, 17 Dec 2019 21:45:19 +0000 (16:45 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 17 Dec 2019 21:45:19 +0000 (16:45 -0500)
From-SVN: r279471

gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/g++.dg/lookup/missing-std-include-9.C [new file with mode: 0644]

index 6b5849e45b3dd8af732b19b2ea95897e93bd5d09..e8a94f463e5bb8db82400443d89c42e680829390 100644 (file)
@@ -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
index e64cd9a9d66ec7c8d91cc4fe1914ce64cad6b172..181dad0e2f2971fef7c6af8be59ab3c0d1c6181a 100644 (file)
@@ -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 (file)
index 0000000..f8e1e1d
--- /dev/null
@@ -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 }