From 89710916cfa82f50be0092347744a5e06a3b5420 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 12 Sep 2025 17:10:35 +0200 Subject: c: function-local static vars --- test/reloc.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/reloc.c (limited to 'test/reloc.c') diff --git a/test/reloc.c b/test/reloc.c new file mode 100644 index 0000000..70cba28 --- /dev/null +++ b/test/reloc.c @@ -0,0 +1,7 @@ + + +float get_value(unsigned x) +{ + static const float values [] = {1.1f, 1.2f, 1.3f, 1.4f}; + return x < 4 ? values[x] : 0.0f; +} -- cgit v1.2.3