From f684a1f964d2761a4721497973023fa82923f121 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 7 Feb 2026 15:33:59 +0900 Subject: feat: support null pointer in initializer --- tests/variables.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/variables.c b/tests/variables.c index 2ba28d1..e6a0b3a 100644 --- a/tests/variables.c +++ b/tests/variables.c @@ -1,4 +1,5 @@ #include +#include int printf(const char*, ...); @@ -33,6 +34,7 @@ struct S2 { struct S2 arr5[] = { {"foo"}, {"bar"}, + {NULL}, }; int main() { @@ -74,6 +76,7 @@ int main() { ASSERT_EQ_STR("foo", arr5[0].x); ASSERT_EQ_STR("bar", arr5[1].x); + ASSERT_EQ(NULL, arr5[2].x); // local variables int foo; -- cgit v1.3-1-g0d28