[[C++ PATCH]] Implement C++2a P0330R2 - Literal Suffixes for ptrdiff_t and size_t
Ed Smith-Rowland
3dw4rd@verizon.net
Thu Feb 4 16:27:18 GMT 2021
On 2/4/21 6:31 AM, Tam S. B. wrote:
> `__cpp_size_t_suffix` is defined as 202006L, but the draft standard says 202011L: http://eel.is/c++draft/cpp.predefined#tab:cpp.predefined.ft-row-48
I looks like you're right. Both the latest draft and
https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations
agree. Not sure what's up with all the dates in the latest draft of P0330...
Jason, is this OK?
Ed
-------------- next part --------------
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 48dec21d4b4..9f993c4aff2 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -1028,7 +1028,7 @@ c_cpp_builtins (cpp_reader *pfile)
if (cxx_dialect > cxx20)
{
/* Set feature test macros for C++23. */
- cpp_define (pfile, "__cpp_size_t_suffix=202006L");
+ cpp_define (pfile, "__cpp_size_t_suffix=202011L");
}
if (flag_concepts)
{
diff --git a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
index 94e08a4896c..4a342e967f8 100644
--- a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
+++ b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
@@ -544,6 +544,6 @@
#ifndef __cpp_size_t_suffix
# error "__cpp_size_t_suffix"
-#elif __cpp_size_t_suffix != 202006
-# error "__cpp_size_t_suffix != 202006"
+#elif __cpp_size_t_suffix != 202011
+# error "__cpp_size_t_suffix != 202011"
#endif
More information about the Gcc-patches
mailing list