summaryrefslogtreecommitdiff
path: root/tests/functions
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-27 13:19:23 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-27 13:19:23 +0000
commit27c0cafdfc66ce731156bf076644716f240318d4 (patch)
treecefff28db49f48d12723fb30c41253096bf51ff1 /tests/functions
parenta3b85c9737b509fd2a792b65aa2365b9bcc9fe6a (diff)
Support for custom attributes
Diffstat (limited to 'tests/functions')
-rw-r--r--tests/functions/test_attributes.zc14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/functions/test_attributes.zc b/tests/functions/test_attributes.zc
index 6495ba9..1d1f366 100644
--- a/tests/functions/test_attributes.zc
+++ b/tests/functions/test_attributes.zc
@@ -137,3 +137,17 @@ struct MyExportedStruct {
a: int;
b: int;
}
+
+@flatten
+fn my_flattened_func() {
+ // This uses a custom GCC attribute that ZenC doesn't know about natively.
+}
+
+@custom_section(".my_const_data")
+struct CustomSectionStruct {
+ x: int;
+}
+
+test "custom attributes" {
+ my_flattened_func();
+}