@@ -138,4 +138,7 @@ struct hash<T*>
// When using gcc, go_unreachable is just gcc_unreachable.
#define go_unreachable() gcc_unreachable()
+// When using gcc, go_fallthrough is just gcc_fallthrough.
+#define go_fallthrough() gcc_fallthrough()
+
#endif // !defined(GO_SYSTEM_H)
@@ -729,6 +729,7 @@ Escape_analysis_assign::statement(Block*, size_t*, Statement* s)
if (this->context_->loop_depth() == 1)
break;
// fallthrough
+ go_fallthrough ();
case Statement::STATEMENT_GO:
{
@@ -1483,6 +1484,7 @@ Escape_analysis_assign::assign(Node* dst, Node* src)
// A non-pointer can't escape from a struct.
if (!e->type()->has_pointer())
break;
+ go_fallthrough ();
}
case Expression::EXPRESSION_CONVERSION:
@@ -5745,6 +5745,7 @@ Binary_expression::do_get_backend(Translate_context* context)
case OPERATOR_DIV:
if (left_type->float_type() != NULL || left_type->complex_type() != NULL)
break;
+ go_fallthrough ();
case OPERATOR_MOD:
is_idiv_op = true;
break;
@@ -5754,6 +5755,7 @@ Binary_expression::do_get_backend(Translate_context* context)
break;
case OPERATOR_BITCLEAR:
this->right_ = Expression::make_unary(OPERATOR_XOR, this->right_, loc);
+ go_fallthrough ();
case OPERATOR_AND:
break;
default:
@@ -674,6 +674,7 @@ Lex::next_token()
}
}
// Fall through.
+ go_fallthrough ();
case '|':
case '=':
case '!':