1 parent 8abcf66 commit de5ce6dCopy full SHA for de5ce6d
1 file changed
unix/gccollect.c
@@ -144,15 +144,7 @@ void gc_collect(void) {
144
regs_t regs;
145
gc_helper_get_regs(regs);
146
// GC stack (and regs because we captured them)
147
-#ifdef __MINGW32__
148
- // The Mingw cross-compiler on Travis complains
149
- // 'warning: dereferencing type-punned pointer will break strict-aliasing rules'
150
- // when casting ®s to void** directly so use a union.
151
- union { regs_t *r; void **ptr; } cast_regs = { ®s };
152
- void **regs_ptr = cast_regs.ptr;
153
-#else
154
- void **regs_ptr = (void**)®s;
155
-#endif
+ void **regs_ptr = (void**)(void*)®s;
156
gc_collect_root(regs_ptr, ((machine_uint_t)stack_top - (machine_uint_t)®s) / sizeof(machine_uint_t));
157
gc_collect_end();
158
0 commit comments