[PATCH 2/7] configure.ac: fix may_alias attribute check

Jussi Kivilinna jussi.kivilinna at iki.fi
Wed Jan 25 22:15:15 CET 2017


* configure.ac: Test may_alias attribute on type, not on variable.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 0 files changed

diff --git a/configure.ac b/configure.ac
index 5dd27ca..d2b863c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1000,7 +1000,8 @@ AC_CACHE_CHECK([whether the GCC style may_alias attribute is supported],
        [gcry_cv_gcc_attribute_may_alias],
        [gcry_cv_gcc_attribute_may_alias=no
         AC_COMPILE_IFELSE([AC_LANG_SOURCE(
-          [[struct { int a; } foo __attribute__ ((may_alias));]])],
+          [[typedef struct foo_s { int a; }
+            __attribute__ ((may_alias)) foo_t;]])],
           [gcry_cv_gcc_attribute_may_alias=yes])])
 if test "$gcry_cv_gcc_attribute_may_alias" = "yes" ; then
    AC_DEFINE(HAVE_GCC_ATTRIBUTE_MAY_ALIAS,1,




More information about the Gcrypt-devel mailing list