diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2023-02-04 17:34:08 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-02-18 17:07:17 +0100 |
commit | 8387df1551f18b90b3936c7cbb311416c3db8032 (patch) | |
tree | 2cc511d578c0a2ea01226cc6b7f0d14e37294954 /configure.ac | |
parent | f60d4057573ecb6a5021e754f54983c709977c62 (diff) |
Annotate functions with access attribute
Supported by GCC since version 10.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 73a8e91c..015f9046 100644 --- a/configure.ac +++ b/configure.ac @@ -188,6 +188,20 @@ AC_COMPILE_IFELSE([ AC_MSG_RESULT(no)) CFLAGS="$old_CFLAGS" +AC_MSG_CHECKING(for access) +old_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wno-error -Werror=attributes" +AC_COMPILE_IFELSE([ + AC_LANG_SOURCE( + [ + __attribute__((access(read_only, 1, 2))) extern int foo(const char* str, unsigned len); + ],[] + )], + AC_DEFINE([HAVE_ATTR_ACCESS], 1, [The access attribute is supported.]) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) +CFLAGS="$old_CFLAGS" + AC_MSG_CHECKING(for NaN support) AC_RUN_IFELSE([ AC_LANG_PROGRAM( |