P0145R2: Refining Expression Order for C++.
authorJason Merrill <jason@redhat.com>
Tue, 14 Jun 2016 20:18:34 +0000 (16:18 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 14 Jun 2016 20:18:34 +0000 (16:18 -0400)
commit4eb24e010993b2d9152c2038566f0114fd65fac7
tree072a2558b885b3a6234c21b60e349923722e60dc
parenta09c81b4ba40aac99fd4c37654e1231f4836f891
P0145R2: Refining Expression Order for C++.

gcc/c-family/
* c.opt (fargs-in-order): New.
* c-opts.c (c_common_post_options): Adjust flag_args_in_order.
gcc/cp/
* cp-tree.h (CALL_EXPR_OPERATOR_SYNTAX, CALL_EXPR_ORDERED_ARGS)
(CALL_EXPR_REVERSE_ARGS): New.
* call.c (build_new_op_1): Set them.
(extract_call_expr, op_is_ordered): New.
(build_over_call): Set CALL_EXPR_ORDERED_ARGS.
* cp-gimplify.c (cp_gimplify_expr) [CALL_EXPR]: Handle new flags.
* pt.c (tsubst_copy_and_build): Copy new flags.
* semantics.c (simplify_aggr_init_expr): Likewise.
* tree.c (build_aggr_init_expr): Likewise.
(build_min_non_dep_op_overload): Likewise.

From-SVN: r237459
14 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-opts.c
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-gimplify.c
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/doc/invoke.texi
gcc/testsuite/g++.dg/cpp1z/eval-order1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/eval-order2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/eval-order3.C [new file with mode: 0644]