From: Jeff Law Date: Fri, 24 Jul 2026 22:19:57 +0000 (-0600) Subject: Fix m68k bootstrap due to -Wempty-body warning X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c19a52852b7bfef10430b90f8f51eedf217663d;p=thirdparty%2Fgcc.git Fix m68k bootstrap due to -Wempty-body warning Ah the jobs of conditional compilation... A recent change is breaking m68k bootstrap as it doesn't have any UNSPECV_VALUES and as a result we end up with if (cond) ; [ With no else clauses. ] Which triggers: > /home/jlaw/test/gcc/gcc/print-rtl.cc: In function ‘void print_exp(pretty_printer*, const_rtx, int)’: > /home/jlaw/test/gcc/gcc/print-rtl.cc:1622:11: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Rather than using ";" we can use a "{}" pair with proper formatting as the warning suggests. Committing as obvious and hopefully restoring m68k bootstrap. gcc/ * print-rtl.cc (print_exp): Avoid -Wempty-body warning. --- diff --git a/gcc/print-rtl.cc b/gcc/print-rtl.cc index b969c6d8229..315b027516d 100644 --- a/gcc/print-rtl.cc +++ b/gcc/print-rtl.cc @@ -1619,7 +1619,8 @@ print_exp (pretty_printer *pp, const_rtx x, int verbose) auto unspec = XINT (x, 1); #if !defined(GENERATOR_FILE) if (unspec < 0) - ; + { + } #if NUM_UNSPECV_VALUES > 0 else if (GET_CODE (x) == UNSPEC_VOLATILE && unspec < NUM_UNSPECV_VALUES)