https://gcc.gnu.org/g:c3312f371fec4ef332df93203852f0fae79b4842
commit c3312f371fec4ef332df93203852f0fae79b4842 Author: Alexandre Oliva <ol...@gnu.org> Date: Thu Nov 21 22:36:42 2024 -0300 fold_truth_andor: drop known-result warnings Diff: --- gcc/config/i386/t-i386 | 2 -- gcc/config/rs6000/t-rs6000 | 4 ---- gcc/gimple-fold.cc | 14 ++------------ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/gcc/config/i386/t-i386 b/gcc/config/i386/t-i386 index 1b904787ec62..bf4ae109af98 100644 --- a/gcc/config/i386/t-i386 +++ b/gcc/config/i386/t-i386 @@ -79,5 +79,3 @@ s-i386-bt: $(srcdir)/config/i386/i386-builtin-types.awk \ $(AWK) -f $^ > tmp-bt.inc $(SHELL) $(srcdir)/../move-if-change tmp-bt.inc i386-builtin-types.inc $(STAMP) $@ - -insn-attrtab.o-warn = -Wno-error diff --git a/gcc/config/rs6000/t-rs6000 b/gcc/config/rs6000/t-rs6000 index a83968d663a6..155788de40a3 100644 --- a/gcc/config/rs6000/t-rs6000 +++ b/gcc/config/rs6000/t-rs6000 @@ -95,10 +95,6 @@ $(srcdir)/config/rs6000/rs6000-tables.opt: $(srcdir)/config/rs6000/genopt.sh \ $(SHELL) $(srcdir)/config/rs6000/genopt.sh $(srcdir)/config/rs6000 > \ $(srcdir)/config/rs6000/rs6000-tables.opt -# FRAME_GROWS_DOWNWARD tests flag_sanitize in a way that rules out a -# test in toplev.c. -toplev.o-warn = -Wno-error - # The rs6000 backend doesn't cause warnings in these files. insn-conditions.o-warn = diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index d55e5941c1ae..1abf09470567 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -8421,19 +8421,9 @@ fold_truth_andor_maybe_separate (location_t loc, result, r_const)) != 1) { if (wanted_code == NE_EXPR) - { - warning (0, - "%<or%> of unmatched not-equal tests" - " is always 1"); - return constant_boolean_node (true, truth_type); - } + return constant_boolean_node (true, truth_type); else - { - warning (0, - "%<and%> of mutually exclusive equal-tests" - " is always 0"); - return constant_boolean_node (false, truth_type); - } + return constant_boolean_node (false, truth_type); } if (lnbitpos < 0)