From: Jakub Jelinek Date: Tue, 15 Mar 2022 12:34:33 +0000 (+0100) Subject: riscv: Allow -Wno-psabi to turn off ABI warnings [PR91229] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98afdc3e2bfccf0a1337013b54f2c5634ef40ee5;p=test_jj.git riscv: Allow -Wno-psabi to turn off ABI warnings [PR91229] While checking if all targets honor -Wno-psabi for ABI related warnings or messages, I found that almost all do, except for riscv. In the testsuite when we want to ignore ABI related messages we typically use -Wno-psabi -w, but it would be nice to get rid of those -w uses eventually. The following allows silencing those warnings with -Wno-psabi rather than just -w even on riscv. 2022-03-15 Jakub Jelinek PR target/91229 * config/riscv/riscv.cc (riscv_pass_aggregate_in_fpr_pair_p, riscv_pass_aggregate_in_fpr_and_gpr_p): Pass OPT_Wpsabi instead of 0 to warning calls. --- diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 7da9d37..ee756aa 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -2918,8 +2918,8 @@ riscv_pass_aggregate_in_fpr_pair_p (const_tree type, if ((n_old != n_new) && (warned == 0)) { - warning (0, "ABI for flattened struct with zero-length bit-fields " - "changed in GCC 10"); + warning (OPT_Wpsabi, "ABI for flattened struct with zero-length " + "bit-fields changed in GCC 10"); warned = 1; } @@ -2960,8 +2960,8 @@ riscv_pass_aggregate_in_fpr_and_gpr_p (const_tree type, && (num_int_old != num_int_new || num_float_old != num_float_new))) && (warned == 0)) { - warning (0, "ABI for flattened struct with zero-length bit-fields " - "changed in GCC 10"); + warning (OPT_Wpsabi, "ABI for flattened struct with zero-length " + "bit-fields changed in GCC 10"); warned = 1; }