tbsaunde+...@tbsaunde.org writes:

> +AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
> +[
> +  AC_CACHE_CHECK([if the type of bitfields matters], 
> gt_cv_bitfield_type_matters,
> +  [
> +    AC_TRY_COMPILE(
> +      [struct foo1 { char x; char :0; char y; };
> +struct foo2 { char x; int :0; char y; };
> +int foo1test[ sizeof (struct foo1) == 2 ? 1 : -1 ];
> +int foo2test[ sizeof (struct foo2) == 5 ? 1 : -1]; ],
> +      [], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
> +  ])
> +  if test $gt_cv_bitfield_type_matters = yes; then
> +    AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
> +      [Define if the type of bitfields effects alignment.])
> +  fi
> +])

gcc/config/aarch64/aarch64.h:#define PCC_BITFIELD_TYPE_MATTERS  1

configure:11554: /opt/gcc/gcc-20150503/Build/./gcc/xgcc 
-B/opt/gcc/gcc-20150503/Build/./gcc/ -B/usr/aarch64-suse-linux/bin/ 
-B/usr/aarch64-suse-linux/lib/ -isystem /usr/aarch64-suse-linux/include 
-isystem /usr/aarch64-suse-linux/sys-include    -c -O2 -g  conftest.c >&5
conftest.c:27:5: error: size of array 'foo2test' is negative
 int foo2test[ sizeof (struct foo2) == 5 ? 1 : -1];
     ^
configure:11554: $? = 1

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to