diff options
author | Jason Merrill <jason@redhat.com> | 2018-04-23 16:49:38 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2018-04-23 16:49:38 -0400 |
commit | aa2b10551159df9eb1b33e049eb36ee53d379b4e (patch) | |
tree | 57df381f854d498e1870295c71d1c59e390e02d6 /libcc1/libcp1plugin.cc | |
parent | 71fbbf65fa775dfe4a3fde9f20008389f9e0e53f (diff) | |
download | gcc-aa2b10551159df9eb1b33e049eb36ee53d379b4e.tar.gz |
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 'libcc1/libcp1plugin.cc')
-rw-r--r-- | libcc1/libcp1plugin.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 0137cc9e4e1..10341477c56 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -3046,7 +3046,8 @@ plugin_build_unary_type_expr (cc1_plugin::connection *self, break; default: - result = cxx_sizeof_or_alignof_type (type, opcode, true); + /* Use the C++11 alignof semantics. */ + result = cxx_sizeof_or_alignof_type (type, opcode, true, true); } if (template_dependent_p) |