summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-03-04 21:56:53 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-11 20:00:01 -0500
commitc98e8332e4a4d806ec53a69b57f38a15e9fab9d4 (patch)
treedec8da48ecd962f87c7ea2a1893c9998c2c061df
parent27da55407121461695a831aac7cb0ce4845260da (diff)
downloadhaskell-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.h2
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)