c2go was putting a fallthrough after the fatal call.
Changed c2go to know that fatal doesn't return,
but then there is a missing return at the end of
the translated Go function.
Move code around a little to make C and Go agree.
Change-Id: Icef3d55ccdde0709c02dd0c2b78826f6da33a146
Reviewed-on: https://go-review.googlesource.com/5170
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Node *l, *r, *a;
switch(n->op) {
- default:
- fatal("ordersafeexpr %O", n->op);
-
case ONAME:
case OLITERAL:
return n;
typecheck(&a, Erv);
return a;
}
+
+ fatal("ordersafeexpr %O", n->op);
+ return nil; // not reached
}
// Istemp reports whether n is a temporary variable.