aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-02-04 18:30:45 +0100
committerJakub Jelinek <jakub@redhat.com>2021-02-04 18:30:45 +0100
commite91f9da57928ab10e2206c64ce490477d3b46ec1 (patch)
tree7261132dda5851e228757c429dd0fa31d82c4a48 /gcc
parente6cc142ad99ab8d28581f4ce61056c9cce74dba3 (diff)
downloadgcc-e91f9da57928ab10e2206c64ce490477d3b46ec1.zip
gcc-e91f9da57928ab10e2206c64ce490477d3b46ec1.tar.gz
gcc-e91f9da57928ab10e2206c64ce490477d3b46ec1.tar.bz2
c++, libcpp: Use make_signed_t<size_t> in the 1z diagnostics
The following patch uses make_signed_t<size_t> instead of make_signed<size_t>::type in the diagnostics, because the former is shorter. It is true that one can't use make_signed<size_t>::type in C++11 code (which is why I haven't changed it in the testcase which is c++11 effective target), but the message talks about C++23 and make_signed_t is a C++14 and later feature, so I think it is fine. 2021-02-04 Jakub Jelinek <jakub@redhat.com> * expr.c (cpp_classify_number): Use make_signed_t<size_t> instead of make_signed<size_t>::type in the diagnostics. * g++.dg/warn/Wsize_t-literals.C: Expect make_signed_t<size_t> instead of make_signed<size_t>::type in the diagnostics.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsize_t-literals.C4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Wsize_t-literals.C b/gcc/testsuite/g++.dg/warn/Wsize_t-literals.C
index dc0025b..ef910a5 100644
--- a/gcc/testsuite/g++.dg/warn/Wsize_t-literals.C
+++ b/gcc/testsuite/g++.dg/warn/Wsize_t-literals.C
@@ -8,5 +8,5 @@ std::size_t S1 = 5678ZU; // { dg-warning {use of C\+\+23 .size_t. integer consta
std::size_t s2 = 1234uz; // { dg-warning {use of C\+\+23 .size_t. integer constant} "" { target c++20_down } }
std::size_t S2 = 5678UZ; // { dg-warning {use of C\+\+23 .size_t. integer constant} "" { target c++20_down } }
-std::make_signed<std::size_t>::type pd1 = 1234z; // { dg-warning {use of C\+\+23 .make_signed<size_t>::type. integer constant} "" { target c++20_down } }
-std::make_signed<std::size_t>::type PD1 = 5678Z; // { dg-warning {use of C\+\+23 .make_signed<size_t>::type. integer constant} "" { target c++20_down } }
+std::make_signed<std::size_t>::type pd1 = 1234z; // { dg-warning {use of C\+\+23 .make_signed_t<size_t>. integer constant} "" { target c++20_down } }
+std::make_signed<std::size_t>::type PD1 = 5678Z; // { dg-warning {use of C\+\+23 .make_signed_t<size_t>. integer constant} "" { target c++20_down } }