summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-01-17 12:35:12 -0500
committerTavian Barnes <tavianator@tavianator.com>2025-01-17 12:35:12 -0500
commitd267ed57314a8bfa7efaf46e444c593f9d45bbc6 (patch)
treec4521fa940c6d80da02a267e5d540f147f5b2937 /src
parentb31fedc279c8eb4f447212afc3dc6c9f62b9ee6e (diff)
downloadbfs-d267ed57314a8bfa7efaf46e444c593f9d45bbc6.tar.xz
build: Feature-detect #pragma nounroll support
Diffstat (limited to 'src')
-rw-r--r--src/bfs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bfs.h b/src/bfs.h
index 6c930ad..32dbbae 100644
--- a/src/bfs.h
+++ b/src/bfs.h
@@ -221,9 +221,9 @@ extern const char bfs_ldlibs[];
/**
* Optimization hint to not unroll a loop.
*/
-#if __clang__
+#if BFS_HAS_PRAGMA_NOUNROLL
# define _nounroll _Pragma("nounroll")
-#elif __GNUC__
+#elif __GNUC__ && !__clang__
# define _nounroll _Pragma("GCC unroll 0")
#else
# define _nounroll