From: Andreas Schwab <schwab@linux-m68k.org>
To: tbsaunde+gcc@tbsaunde.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] fixup libobjc usage of PCC_BITFIELD_TYPE_MATTERS
Date: Sun, 03 May 2015 09:00:00 -0000 [thread overview]
Message-ID: <m24mnut4sd.fsf@linux-m68k.org> (raw)
In-Reply-To: <1430537453-25556-1-git-send-email-tbsaunde+gcc@tbsaunde.org> (tbsaunde's message of "Fri, 1 May 2015 23:30:53 -0400")
tbsaunde+gcc@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, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2015-05-03 9:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 3:31 tbsaunde+gcc
2015-05-02 3:36 ` pinskia
2015-05-02 8:03 ` Jakub Jelinek
2015-05-02 13:08 ` Trevor Saunders
2015-05-02 13:26 ` Jakub Jelinek
2015-05-03 9:00 ` Andreas Schwab [this message]
2015-05-04 7:38 ` Trevor Saunders
2015-05-04 17:46 ` Jeff Law
2015-05-05 3:39 ` [PATCH] Improve the test in bitfields.m4 tbsaunde+gcc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24mnut4sd.fsf@linux-m68k.org \
--to=schwab@linux-m68k.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tbsaunde+gcc@tbsaunde.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).