This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79232] [7 Regression] error: invalid rhs for gimple memory store
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Jan 2017 20:25:28 +0000
- Subject: [Bug c++/79232] [7 Regression] error: invalid rhs for gimple memory store
- Auto-submitted: auto-generated
- References: <bug-79232-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79232
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On the C++, the question really is what C++17 wants with comma expression on
the lhs used as lvalue and what should be done for C++14 and earlier.
Shouldn't COMPOUND_EXPR be handled like before for
-fstrong-eval-order={none,some}?
For
(a ? b : c) = d;
and -fstrong-eval-order=all, if all of a, b, c, d have side-effects, in what
order they should be evaluated? Right now g++ will turn that into
a ? (b = d) : (c = d); and thus evaluate a's side-effects first, then d's and
then either b's or c's. Shouldn't it be evaluated by taking address of b and d
and evaluating a only after d's side-effects? And then similar question about
COMPOUND_EXPR:
(e, (a ? b : c)) = d;
Or can it be (e, a) ? (b = d) : (c = d); ?
Jason?