summaryrefslogtreecommitdiff
path: root/rts/sm/Scav.c
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-11-02 14:25:27 -0400
committerBen Gamari <ben@smart-cactus.org>2018-11-02 17:13:03 -0400
commit6bb8aaa3b4fcebf8f0de2f81f00dcc20b857c4f5 (patch)
tree09eaa82c607421240ba01ff0b312b804f44bab5e /rts/sm/Scav.c
parent5f81952e230fef1f65ae473e09d44101c489c483 (diff)
downloadhaskell-6bb8aaa3b4fcebf8f0de2f81f00dcc20b857c4f5.tar.gz
rts: Add FALLTHROUGH macro
Instead of using the GCC `/* fallthrough */` syntax we now use the `__attribute__((fallthrough))`, which Phyx says should be more portable than the former. Also adds a missing fallthrough annotation in the MachO linker, fixing #14613. Reviewers: erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter GHC Trac Issues: #14613 Differential Revision: https://phabricator.haskell.org/D5292
Diffstat (limited to 'rts/sm/Scav.c')
-rw-r--r--rts/sm/Scav.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c
index 2f61914e55..8bc702900b 100644
--- a/rts/sm/Scav.c
+++ b/rts/sm/Scav.c
@@ -498,7 +498,7 @@ scavenge_block (bdescr *bd)
case FUN_1_0:
scavenge_fun_srt(info);
- /* fallthrough */
+ FALLTHROUGH;
case CONSTR_1_0:
evacuate(&((StgClosure *)p)->payload[0]);
p += sizeofW(StgHeader) + 1;
@@ -511,7 +511,7 @@ scavenge_block (bdescr *bd)
case FUN_0_1:
scavenge_fun_srt(info);
- /* fallthrough */
+ FALLTHROUGH;
case CONSTR_0_1:
p += sizeofW(StgHeader) + 1;
break;
@@ -523,7 +523,7 @@ scavenge_block (bdescr *bd)
case FUN_0_2:
scavenge_fun_srt(info);
- /* fallthrough */
+ FALLTHROUGH;
case CONSTR_0_2:
p += sizeofW(StgHeader) + 2;
break;
@@ -536,7 +536,7 @@ scavenge_block (bdescr *bd)
case FUN_1_1:
scavenge_fun_srt(info);
- /* fallthrough */
+ FALLTHROUGH;
case CONSTR_1_1:
evacuate(&((StgClosure *)p)->payload[0]);
p += sizeofW(StgHeader) + 2;
@@ -1738,7 +1738,7 @@ scavenge_static(void)
case FUN_STATIC:
scavenge_fun_srt(info);
- /* fallthrough */
+ FALLTHROUGH;
// a FUN_STATIC can also be an SRT, so it may have pointer
// fields. See Note [SRTs] in CmmBuildInfoTables, specifically