Hi, This patch merges the D front-end with upstream dmd 94950cae58.
D front-end changes: - The compiler now accepts `-fextern-std=c++23' Bootstrapped and regression tested on x86_64-linux-gnu/-m32, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 94950cae58. * d-lang.cc (d_handle_option): Add case for CppStdRevisionCpp23. * gdc.texi: Document -fextern-std=c++23. * lang.opt (fextern-std=): Add c++23. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 94950cae58. Reviewed-on: https://github.com/dlang/dmd/pull/21043 --- gcc/d/d-lang.cc | 1 + gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/globals.d | 1 + gcc/d/dmd/globals.h | 3 ++- gcc/d/gdc.texi | 2 ++ gcc/d/lang.opt | 3 +++ libphobos/libdruntime/MERGE | 2 +- libphobos/libdruntime/core/stdcpp/xutility.d | 1 + 8 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc index 21f46ffb6aa..b3786be3c90 100644 --- a/gcc/d/d-lang.cc +++ b/gcc/d/d-lang.cc @@ -510,6 +510,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, case CppStdRevisionCpp14: case CppStdRevisionCpp17: case CppStdRevisionCpp20: + case CppStdRevisionCpp23: global.params.cplusplus = (CppStdRevision) value; break; diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index f274580f2d6..9982d0dd83e 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -8db14cf8467ca25256904d51169b176c9c89afb1 +94950cae582d89f5ba2720786522f669f620f9d1 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/globals.d b/gcc/d/dmd/globals.d index 4a637b519c9..900c554e5f4 100644 --- a/gcc/d/dmd/globals.d +++ b/gcc/d/dmd/globals.d @@ -62,6 +62,7 @@ enum CppStdRevision : uint cpp14 = 2014_02, cpp17 = 2017_03, cpp20 = 2020_02, + cpp23 = 2023_02, } /// Trivalent boolean to represent the state of a `revert`able change diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h index cdb0663b18d..69fe709f4b0 100644 --- a/gcc/d/dmd/globals.h +++ b/gcc/d/dmd/globals.h @@ -73,7 +73,8 @@ enum CppStdRevision CppStdRevisionCpp11 = 201103, CppStdRevisionCpp14 = 201402, CppStdRevisionCpp17 = 201703, - CppStdRevisionCpp20 = 202002 + CppStdRevisionCpp20 = 202002, + CppStdRevisionCpp23 = 202302, }; /// Trivalent boolean to represent the state of a `revert`able change diff --git a/gcc/d/gdc.texi b/gcc/d/gdc.texi index 1a84d6dc451..2cb0c4a6267 100644 --- a/gcc/d/gdc.texi +++ b/gcc/d/gdc.texi @@ -273,6 +273,8 @@ Sets @code{__traits(getTargetInfo, "cppStd")} to @code{201703}. This is the default. @item c++20 Sets @code{__traits(getTargetInfo, "cppStd")} to @code{202002}. +@item c++23 +Sets @code{__traits(getTargetInfo, "cppStd")} to @code{202302}. @end table @opindex finvariants diff --git a/gcc/d/lang.opt b/gcc/d/lang.opt index f769a71aee8..50c6f2f4da4 100644 --- a/gcc/d/lang.opt +++ b/gcc/d/lang.opt @@ -320,6 +320,9 @@ Enum(extern_stdcpp) String(c++17) Value(201703) EnumValue Enum(extern_stdcpp) String(c++20) Value(202002) +EnumValue +Enum(extern_stdcpp) String(c++23) Value(202302) + fignore-unknown-pragmas D Ignore unsupported pragmas. diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index 18c9d1190ce..9982d0dd83e 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -d2ee11364c25ca8865eb0acb9596a6147532ef41 +94950cae582d89f5ba2720786522f669f620f9d1 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/libphobos/libdruntime/core/stdcpp/xutility.d b/libphobos/libdruntime/core/stdcpp/xutility.d index 5e2e711ba67..f93df68deba 100644 --- a/libphobos/libdruntime/core/stdcpp/xutility.d +++ b/libphobos/libdruntime/core/stdcpp/xutility.d @@ -35,6 +35,7 @@ enum CppStdRevision : uint cpp14 = 201402, cpp17 = 201703, cpp20 = 202002, + cpp23 = 202302, } /** -- 2.43.0