d: Add C++23 to CppStdRevision enum

D front-end changes:

	- The compiler now accepts `-fextern-std=c++23'

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
This commit is contained in:
Iain Buclaw
2025-03-22 10:42:21 +01:00
parent 76df0e069f
commit 1f42269ee4
8 changed files with 12 additions and 3 deletions

View File

@@ -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;

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -35,6 +35,7 @@ enum CppStdRevision : uint
cpp14 = 201402,
cpp17 = 201703,
cpp20 = 202002,
cpp23 = 202302,
}
/**