This patch to the Go frontend by Marek Polacek fixes one missing break
statement and adds a couple of "fall through" comments to fix the Go
frontend for -Wimplicit-fallthrough.  Committed to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 239315)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-8da2129a005cc1f44d4d993b0b7312b64c0d68a4
+5e05b7bc947231b4d5a8327bf63e2fa648e51dc7
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: gcc/go/gofrontend/escape.cc
===================================================================
--- gcc/go/gofrontend/escape.cc (revision 239140)
+++ gcc/go/gofrontend/escape.cc (working copy)
@@ -281,6 +281,7 @@ Node::op_format() const
                {
                case Runtime::PANIC:
                  op << "panic";
+                 break;
 
                case Runtime::APPEND:
                  op << "append";
@@ -1923,6 +1924,7 @@ Escape_analysis_assign::assign(Node* dst
            if (!e->type()->has_pointer())
              break;
          }
+         // Fall through.
 
        case Expression::EXPRESSION_CONVERSION:
        case Expression::EXPRESSION_TYPE_GUARD:
Index: gcc/go/gofrontend/expressions.cc
===================================================================
--- gcc/go/gofrontend/expressions.cc    (revision 239095)
+++ gcc/go/gofrontend/expressions.cc    (working copy)
@@ -5767,6 +5767,7 @@ Binary_expression::do_get_backend(Transl
     case OPERATOR_DIV:
       if (left_type->float_type() != NULL || left_type->complex_type() != NULL)
         break;
+      // Fall through.
     case OPERATOR_MOD:
       is_idiv_op = true;
       break;

Reply via email to