aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-04-23 16:49:38 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-04-23 16:49:38 -0400
commitaa2b10551159df9eb1b33e049eb36ee53d379b4e (patch)
tree57df381f854d498e1870295c71d1c59e390e02d6 /gcc/cp/decl.c
parent71fbbf65fa775dfe4a3fde9f20008389f9e0e53f (diff)
downloadgcc-aa2b10551159df9eb1b33e049eb36ee53d379b4e.zip
gcc-aa2b10551159df9eb1b33e049eb36ee53d379b4e.tar.gz
gcc-aa2b10551159df9eb1b33e049eb36ee53d379b4e.tar.bz2
PR c++/69560 - wrong alignof(double) on x86.
CWG 1879 - Inadequate definition of alignment requirement. * cp-tree.h (ALIGNOF_EXPR_STD_P): New. * typeck.c (cxx_sizeof_or_alignof_type): Add std_alignof parm. (cxx_sizeof_expr, cxx_sizeof_nowarn, cxx_alignas_expr) (cxx_alignof_expr): Pass it. * parser.c (cp_parser_unary_expression): Pass it. * pt.c (tsubst_copy): Copy it. (tsubst_copy_and_build): Pass it. * decl.c (fold_sizeof_expr): Pass it. From-SVN: r259578
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d822745..55e2343 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -9542,10 +9542,10 @@ fold_sizeof_expr (tree t)
tree r;
if (SIZEOF_EXPR_TYPE_P (t))
r = cxx_sizeof_or_alignof_type (TREE_TYPE (TREE_OPERAND (t, 0)),
- SIZEOF_EXPR, false);
+ SIZEOF_EXPR, false, false);
else if (TYPE_P (TREE_OPERAND (t, 0)))
r = cxx_sizeof_or_alignof_type (TREE_OPERAND (t, 0), SIZEOF_EXPR,
- false);
+ false, false);
else
r = cxx_sizeof_or_alignof_expr (TREE_OPERAND (t, 0), SIZEOF_EXPR,
false);