diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-12-04 22:57:20 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2013-12-04 22:57:20 +0000 |
commit | 296674dbc9842ac009f558390da2bf6e5a9d4409 (patch) | |
tree | 1d857f76a0338447e2abb6b4d8b9d3a69458fff2 /gcc/objc | |
parent | 31e071aeb827f49ce2e891620852198e99d44a0c (diff) | |
download | gcc-296674dbc9842ac009f558390da2bf6e5a9d4409.zip gcc-296674dbc9842ac009f558390da2bf6e5a9d4409.tar.gz gcc-296674dbc9842ac009f558390da2bf6e5a9d4409.tar.bz2 |
re PR c/52023 ([C11] _Alignof (double) yields wrong value on x86)
PR c/52023
c-family:
* c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
and check field alignment if set.
* c-common.h (c_sizeof_or_alignof_type): Update prototype.
(c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
c:
* c-parser.c (c_parser_alignas_specifier): Use
c_sizeof_or_alignof_type instead of c_alignof.
(c_parser_alignof_expression): Likewise, with min_alignof
parameter depending on alignof spelling used.
cp:
* typeck.c (cxx_sizeof_or_alignof_type): Update call to
c_sizeof_or_alignof_type.
objc:
* objc-act.c (objc_synthesize_getter): Update calls to
c_sizeof_or_alignof_type.
testsuite:
* gcc.dg/c11-align-6.c: New test.
From-SVN: r205685
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 6ec2ef5..366bc3f 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,9 @@ +2013-12-04 Joseph Myers <joseph@codesourcery.com> + + PR c/52023 + * objc-act.c (objc_synthesize_getter): Update calls to + c_sizeof_or_alignof_type. + 2013-11-22 Andrew MacLeod <amacleod@redhat.com> * objc/objc-act.c: Add required include files from gimple.h. diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 2a551ee..4a10f57 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -7273,6 +7273,7 @@ objc_synthesize_getter (tree klass, tree class_methods ATTRIBUTE_UNUSED, tree pr the same type, there is no need to lookup the ivar. */ size_of = c_sizeof_or_alignof_type (location, TREE_TYPE (property), true /* is_sizeof */, + false /* min_alignof */, false /* complain */); if (PROPERTY_NONATOMIC (property)) @@ -7474,6 +7475,7 @@ objc_synthesize_setter (tree klass, tree class_methods ATTRIBUTE_UNUSED, tree pr the same type, there is no need to lookup the ivar. */ size_of = c_sizeof_or_alignof_type (location, TREE_TYPE (property), true /* is_sizeof */, + false /* min_alignof */, false /* complain */); if (PROPERTY_NONATOMIC (property)) |