diff --git a/src/cmd/8g/cgen.c b/src/cmd/8g/cgen.c index 5d8be4678b..48619ac732 100644 --- a/src/cmd/8g/cgen.c +++ b/src/cmd/8g/cgen.c @@ -1146,7 +1146,7 @@ sgen(Node *n, Node *res, int64 w) int32 c, q, odst, osrc; if(debug['g']) { - print("\nsgen w=%ld\n", w); + print("\nsgen w=%lld\n", w); dump("r", n); dump("res", res); } diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c index dcaa0b192b..54bda1ac84 100644 --- a/src/cmd/8l/asm.c +++ b/src/cmd/8l/asm.c @@ -1004,6 +1004,9 @@ asmb(void) phsh(ph, sh); } + // Additions to the reserved area must be above this line. + USED(resoff); + elfphload(&segtext); elfphload(&segdata); diff --git a/src/cmd/gc/pgen.c b/src/cmd/gc/pgen.c index 8e65ba22db..f2b75d61b6 100644 --- a/src/cmd/gc/pgen.c +++ b/src/cmd/gc/pgen.c @@ -124,7 +124,7 @@ compile(Node *fn) print("allocauto: %lld to %lld\n", oldstksize, (vlong)stksize); setlineno(curfn); - if(stksize+maxarg > (1ULL<<31)) + if((int64)stksize+maxarg > (1ULL<<31)) yyerror("stack frame too large (>2GB)"); defframe(ptxt); diff --git a/src/cmd/gc/reflect.c b/src/cmd/gc/reflect.c index c8f8b39644..0847e9a3fb 100644 --- a/src/cmd/gc/reflect.c +++ b/src/cmd/gc/reflect.c @@ -907,7 +907,7 @@ dumptypestructs(void) } } -Sym* +static Sym* dalgsym(Type *t) { int ot; diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index 55932ff3f0..3fd5209310 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -1108,11 +1108,9 @@ eqtype1(Type *t1, Type *t2, TypePairList *assumed_equal) goto no; yes: - assumed_equal = l.next; return 1; no: - assumed_equal = l.next; return 0; } @@ -2491,7 +2489,7 @@ genwrapper(Type *rcvr, Type *method, Sym *newnam, int iface) } static Node* -hashmem(Type *t, vlong width) +hashmem(Type *t) { Node *tfn, *n; Sym *sym; @@ -2519,7 +2517,7 @@ hashfor(Type *t) a = algtype1(t, nil); switch(a) { case AMEM: - return hashmem(t, t->width); + return hashmem(t); case AINTER: sym = pkglookup("interhash", runtimepkg); break; @@ -2667,7 +2665,7 @@ genhash(Sym *sym, Type *t) size = t->width - first->width; // first->width is offset else size = t1->width - first->width; // both are offsets - hashel = hashmem(first->type, size); + hashel = hashmem(first->type); // hashel(h, size, &p.first) call = nod(OCALL, hashel, N); call->list = list(call->list, nh); diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index 0118c08a74..ea18766e30 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -1194,10 +1194,6 @@ walkexpr(Node **np, NodeList **init) n = r; goto ret; - - n = r; - goto ret; - case OARRAYLIT: case OMAPLIT: case OSTRUCTLIT: