From cdd4d136be5d977ab4237c6b29bd110145fe309d Mon Sep 17 00:00:00 2001 From: dzaima Date: Fri, 4 Jun 2021 15:47:26 +0300 Subject: [PATCH] make gcc happy --- src/core/fillarr.h | 2 +- src/h.h | 10 +++++----- src/vm.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/fillarr.h b/src/core/fillarr.h index 0dc8fb4f..1bdd7c32 100644 --- a/src/core/fillarr.h +++ b/src/core/fillarr.h @@ -31,7 +31,7 @@ static B getFillR(B x) { // doesn't consume; can return bi_noFill switch(TI(x).elType) { default: UD; case el_f64: case el_i32: return m_i32(0); case el_c32: return m_c32(' '); - case el_B: + case el_B:; u8 t = v(x)->type; if (t==t_fillarr ) return inc(c(FillArr,x )->fill); if (t==t_fillslice) return inc(c(FillArr,c(Slice,x)->p)->fill); diff --git a/src/h.h b/src/h.h index 8097ba6e..6d37f480 100644 --- a/src/h.h +++ b/src/h.h @@ -194,11 +194,11 @@ void gc_forceGC(); // force a gc; who knows what happens if gc is disabled (prob void gc_visitRoots(); // some primitive actions -static const B bi_N = tag(0, TAG_TAG); -static const B bi_noVar = tag(1, TAG_TAG); -static const B bi_badHdr = tag(2, TAG_TAG); -static const B bi_optOut = tag(3, TAG_TAG); -static const B bi_noFill = tag(5, TAG_TAG); +static const B bi_N = b((u64)0x7FF2000000000000ull); // tag(0, TAG_TAG); // make gcc happy +static const B bi_noVar = b((u64)0x7FF2000000000001ull); // tag(1, TAG_TAG); +static const B bi_badHdr = b((u64)0x7FF2000000000002ull); // tag(2, TAG_TAG); +static const B bi_optOut = b((u64)0x7FF2000000000003ull); // tag(3, TAG_TAG); +static const B bi_noFill = b((u64)0x7FF2000000000005ull); // tag(5, TAG_TAG); extern B bi_emptyHVec, bi_emptyIVec, bi_emptyCVec, bi_emptySVec; static void dec(B x); static B inc(B x); diff --git a/src/vm.c b/src/vm.c index 93a9f037..578d6542 100644 --- a/src/vm.c +++ b/src/vm.c @@ -167,7 +167,7 @@ Block* compileBlock(B block, Comp* comp, bool* bDone, i32* bc, usz bcIA, B block bool ret = false; #define A64(X) { u64 a64=(X); TSADD(nBCT, (u32)a64); TSADD(nBCT, a64>>32); } switch (*c) { - case PUSH: + case PUSH:; B obj = comp->objs->a[c[1]]; TSADD(nBCT, isVal(obj)? ADDI : ADDU); A64(obj.u);