summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/has/pragma-nounroll.c10
-rw-r--r--build/header.mk1
2 files changed, 11 insertions, 0 deletions
diff --git a/build/has/pragma-nounroll.c b/build/has/pragma-nounroll.c
new file mode 100644
index 0000000..2bdae14
--- /dev/null
+++ b/build/has/pragma-nounroll.c
@@ -0,0 +1,10 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+/// -Werror
+
+int main(void) {
+#pragma nounroll
+ for (int i = 0; i < 100; ++i);
+ return 0;
+}
diff --git a/build/header.mk b/build/header.mk
index 919a2a2..6a63221 100644
--- a/build/header.mk
+++ b/build/header.mk
@@ -36,6 +36,7 @@ HEADERS := \
gen/has/getprogname.h \
gen/has/io-uring-max-workers.h \
gen/has/pipe2.h \
+ gen/has/pragma-nounroll.h \
gen/has/posix-getdents.h \
gen/has/posix-spawn-addfchdir-np.h \
gen/has/posix-spawn-addfchdir.h \