summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-11-28 18:53:10 +0900
committerNobuyoshi Nakada <[email protected]>2024-11-28 18:53:10 +0900
commitb8f248ee5a38b1123a8dac6e8895640e64504ea7 (patch)
tree86d2421df84ef39481916be919e0d3f747c800ca /compile.c
parent31a3e877771dabbcd40f481023eaaf541c58af6d (diff)
Initialize `LINK_ANCHOR` totally
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12198
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index bd691627e3..38afc70cdf 100644
--- a/compile.c
+++ b/compile.c
@@ -436,10 +436,8 @@ do { \
#define NO_CHECK(sub) (void)(sub)
#define BEFORE_RETURN
-/* leave name uninitialized so that compiler warn if INIT_ANCHOR is
- * missing */
#define DECL_ANCHOR(name) \
- LINK_ANCHOR name[1] = {{{ISEQ_ELEMENT_ANCHOR,},}}
+ LINK_ANCHOR name[1] = {{{ISEQ_ELEMENT_ANCHOR,},&name[0].anchor}}
#define INIT_ANCHOR(name) \
(name->last = &name->anchor)