+2020-05-15 Jason Merrill <jason@redhat.com>
+
+ * c-opts.c (set_std_cxx20): Set flag_coroutines.
+
2020-05-13 Jason Merrill <jason@redhat.com>
* c.opt (std=c++20): Make c++2a the alias.
lang_hooks.name = "GNU C++17";
}
-/* Set the C++ 202a draft standard (without GNU extensions if ISO). */
+/* Set the C++ 2020 standard (without GNU extensions if ISO). */
static void
set_std_cxx20 (int iso)
{
flag_isoc94 = 1;
flag_isoc99 = 1;
flag_isoc11 = 1;
- /* C++20 includes concepts. */
+ /* C++20 includes coroutines. */
+ flag_coroutines = true;
cxx_dialect = cxx20;
- lang_hooks.name = "GNU C++17"; /* Pretend C++17 until standardization. */
+ lang_hooks.name = "GNU C++20";
}
/* Args to -d specify what to dump. Silently ignore
+2020-05-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/coroutines/coro.h: Always #include <utility>.
+ * g++.dg/coroutines/coroutines.exp (DEFAULT_COROFLAGS): Use
+ -std=c++20.
+
2020-05-15 Segher Boessenkool <segher@kernel.crashing.org>
* gcc.target/powerpc/vec-gnb-0.c: Use int128 effective target.
#include <coroutine>
-# if __clang__
-# include <utility>
-# endif
-
namespace coro = std;
#elif __has_include(<experimental/coroutine>)
#include <experimental/coroutine>
-# if __clang__
-# include <utility>
-# endif
-
namespace coro = std::experimental;
#else
#include <cstdlib> /* for abort () */
+#include <utility> /* for std::forward */
+
#ifndef OUTPUT
# define PRINT(X)
# define PRINTF (void)
}
set DEFAULT_COROFLAGS $DEFAULT_CXXFLAGS
-lappend DEFAULT_COROFLAGS "-std=c++17" "-fcoroutines"
+lappend DEFAULT_COROFLAGS "-std=c++20"
dg-init