diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-03-04 21:56:53 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-03-11 20:00:01 -0500 |
commit | c98e8332e4a4d806ec53a69b57f38a15e9fab9d4 (patch) | |
tree | dec8da48ecd962f87c7ea2a1893c9998c2c061df | |
parent | 27da55407121461695a831aac7cb0ce4845260da (diff) | |
download | haskell-c98e8332e4a4d806ec53a69b57f38a15e9fab9d4.tar.gz |
CmmToC: fix -Wunused-value warning in ASSIGN_BaseReg
When ASSIGN_BaseReg is a no-op, we shouldn't generate any C code,
otherwise C compiler complains a bunch of -Wunused-value warnings when
doing unregisterised codegen.
-rw-r--r-- | rts/include/stg/Regs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/include/stg/Regs.h b/rts/include/stg/Regs.h index e37ce3eba4..a4e6db2415 100644 --- a/rts/include/stg/Regs.h +++ b/rts/include/stg/Regs.h @@ -442,7 +442,7 @@ GLOBAL_REG_DECL(StgRegTable *,BaseReg,REG_Base) #error BaseReg must be in a register for THREADED_RTS #endif #define BaseReg (&((struct PartCapability_ *)MainCapability)->r) -#define ASSIGN_BaseReg(e) (e) +#define ASSIGN_BaseReg(e) #endif #if defined(REG_Sp) && !defined(NO_GLOBAL_REG_DECLS) |