From d4a6c0ea4b7e374eafc6ca6f47d398514e5fb835 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 29 Dec 2016 11:35:33 +0100 Subject: [PATCH] Add RejectNegative for a c option. PR c/78933 * g++.dg/pr78933.C: New test. PR c/78933 * c.opt (strong-eval-order): Add RejectNegative keyword. From-SVN: r243960 --- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c.opt | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/pr78933.C | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/pr78933.C diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 72a6803f1c7..d76ecd39ffd 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2016-12-29 Martin Liska + + PR c/78933 + * c.opt (strong-eval-order): Add RejectNegative keyword. + 2016-12-22 Jason Merrill Implement P0522R0, matching of template template arguments. diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 1d40d76f1b6..4652708b7f1 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1655,7 +1655,7 @@ Follow the C++17 evaluation order requirements for assignment expressions, shift, member function calls, etc. fstrong-eval-order= -C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) Init(-1) +C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1) Follow the C++17 evaluation order requirements for assignment expressions, shift, member function calls, etc. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 09b2b5bda7b..5e6db289f4b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-12-29 Martin Liska + + PR c/78933 + * g++.dg/pr78933.C: New test. + 2016-12-28 Uros Bizjak PR target/78904 diff --git a/gcc/testsuite/g++.dg/pr78933.C b/gcc/testsuite/g++.dg/pr78933.C new file mode 100644 index 00000000000..91a3a511711 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr78933.C @@ -0,0 +1,3 @@ +// PR c/78933 +// { dg-do compile } +// { dg-options "-fno-strong-eval-order" } -- 2.30.2