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.

Jeff
        * print-rtl.cc (print_exp): Avoid -Wempty-body warning.

diff --git a/gcc/print-rtl.cc b/gcc/print-rtl.cc
index b969c6d82299..315b027516dc 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)

Reply via email to