aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/reloc.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-09-12 17:10:35 +0200
committerlemon <lsof@mailbox.org>2025-09-12 17:10:35 +0200
commit89710916cfa82f50be0092347744a5e06a3b5420 (patch)
tree02cff596fad2f6b4ea577ad35bc77d53dcb4a413 /test/reloc.c
parentc8af181799015ea39b8868ef5d07b10ed255e799 (diff)
c: function-local static vars
Diffstat (limited to 'test/reloc.c')
-rw-r--r--test/reloc.c7
1 files changed, 7 insertions, 0 deletions
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;
+}