aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-06-14 16:18:34 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-06-14 16:18:34 -0400
commit4eb24e010993b2d9152c2038566f0114fd65fac7 (patch)
tree072a2558b885b3a6234c21b60e349923722e60dc /gcc/doc
parenta09c81b4ba40aac99fd4c37654e1231f4836f891 (diff)
downloadgcc-4eb24e010993b2d9152c2038566f0114fd65fac7.zip
gcc-4eb24e010993b2d9152c2038566f0114fd65fac7.tar.gz
gcc-4eb24e010993b2d9152c2038566f0114fd65fac7.tar.bz2
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
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 223fd86..2105351 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -189,7 +189,8 @@ in the following sections.
@item C++ Language Options
@xref{C++ Dialect Options,,Options Controlling C++ Dialect}.
-@gccoptlist{-fabi-version=@var{n} -fno-access-control -fcheck-new @gol
+@gccoptlist{-fabi-version=@var{n} -fno-access-control @gol
+-fargs-in-order=@var{n} -fcheck-new @gol
-fconstexpr-depth=@var{n} -ffriend-injection @gol
-fno-elide-constructors @gol
-fno-enforce-eh-specs @gol
@@ -2233,6 +2234,14 @@ option is used for the warning.
Turn off all access checking. This switch is mainly useful for working
around bugs in the access control code.
+@item -fargs-in-order
+@opindex fargs-in-order
+Evaluate function arguments and operands of some binary expressions in
+left-to-right order, and evaluate the right side of an assignment
+before the left side, as proposed in P0145R2. Enabled by default with
+@option{-std=c++1z}. @option{-fargs-in-order=1} implements all of the
+ordering requirements except function arguments.
+
@item -fcheck-new
@opindex fcheck-new
Check that the pointer returned by @code{operator new} is non-null