mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
Add C++23 to CppStdRevision enum (#21043)
This commit is contained in:
parent
8db14cf846
commit
94950cae58
7 changed files with 15 additions and 1 deletions
4
changelog/dmd.extern-std-cpp23.dd
Normal file
4
changelog/dmd.extern-std-cpp23.dd
Normal file
|
@ -0,0 +1,4 @@
|
|||
The compiler now accepts `-extern-std=c++23`
|
||||
|
||||
The compiler now accepts c++23 as a supported standard for `-extern-std=`.
|
||||
Currently this only changes the value of `__traits(getTargetInfo, "cppStd")`.
|
|
@ -359,6 +359,8 @@ dmd -cov -unittest myprog.d
|
|||
Sets `__traits(getTargetInfo, \"cppStd\")` to `201703`)
|
||||
$(LI $(I c++20): Use C++20 name mangling,
|
||||
Sets `__traits(getTargetInfo, \"cppStd\")` to `202002`)
|
||||
$(LI $(I c++23): Use C++23 name mangling,
|
||||
Sets `__traits(getTargetInfo, \"cppStd\")` to `202302`)
|
||||
)",
|
||||
),
|
||||
Option("extern-std=[h|help|?]",
|
||||
|
@ -1122,6 +1124,7 @@ struct CLIUsage
|
|||
=c++14 Sets `__traits(getTargetInfo, \"cppStd\")` to `201402`
|
||||
=c++17 Sets `__traits(getTargetInfo, \"cppStd\")` to `201703`
|
||||
=c++20 Sets `__traits(getTargetInfo, \"cppStd\")` to `202002`
|
||||
=c++23 Sets `__traits(getTargetInfo, \"cppStd\")` to `202302`
|
||||
";
|
||||
|
||||
/// Options supported by -HC
|
||||
|
|
|
@ -6234,6 +6234,7 @@ enum class CppStdRevision : uint32_t
|
|||
cpp14 = 201402u,
|
||||
cpp17 = 201703u,
|
||||
cpp20 = 202002u,
|
||||
cpp23 = 202302u,
|
||||
};
|
||||
|
||||
enum class CHECKENABLE : uint8_t
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1143,6 +1143,9 @@ bool parseCommandLine(const ref Strings arguments, const size_t argc, ref Param
|
|||
case "c++20":
|
||||
params.cplusplus = CppStdRevision.cpp20;
|
||||
break;
|
||||
case "c++23":
|
||||
params.cplusplus = CppStdRevision.cpp23;
|
||||
break;
|
||||
default:
|
||||
error("switch `%s` is invalid", p);
|
||||
params.help.externStd = true;
|
||||
|
|
|
@ -35,6 +35,7 @@ enum CppStdRevision : uint
|
|||
cpp14 = 201402,
|
||||
cpp17 = 201703,
|
||||
cpp20 = 202002,
|
||||
cpp23 = 202302,
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue