https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98947
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Incorrect warning when |[10/11 Regression]
|using a ternary operator to |Incorrect warning when
|select one of two volatile |using a ternary operator to
|variables to write to |select one of two volatile
| |variables to write to
Priority|P3 |P2
Target Milestone|--- |10.3
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think warning on
(b ? x : y) = 27;
is bogus, therefore I'd argue that this is a regression; gcc 9 didn't issue any
warnings with -std=c++2a.
I have a patch. Of course, we should still warn for
(b ? x : y) += 27;
(b ? (x = 24) : y) = 25;
etc.