diff m4/stdalign.m4 @ 17434:6b7c1e9c98d6

stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11 Problem reported by Ulrich Mueller in <http://bugs.gnu.org/14812>. * lib/stdalign.in.h (_Alignas, _Alignof): Port to FreeBSD 9.1, and to C11 and C++11. (_Alignas): Also support ICC. * lib/verify.h (_Static_assert): Undef if <stddef.h> defines it. * m4/stdalign.m4 (gl_STDALIGN_H): Port to ICC and to C++11.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 07 Jul 2013 23:06:26 -0700
parents 7524d97ae56f
children 344018b6e5d7
line wrap: on
line diff
--- a/m4/stdalign.m4	Sat Jul 06 17:12:29 2013 -0700
+++ b/m4/stdalign.m4	Sun Jul 07 23:06:26 2013 -0700
@@ -31,7 +31,8 @@
 
             /* Test _Alignas only on platforms where gnulib can help.  */
             #if \
-                (__GNUC__ || __IBMC__ || __IBMCPP__ \
+                ((defined __cplusplus && 201103 <= __cplusplus) \
+                 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
                  || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
               struct alignas_test { char c; char alignas (8) alignas_8; };
               char test_alignas[offsetof (struct alignas_test, alignas_8) == 8