]> gcc.gnu.org Git - gcc.git/commit
c++: Implement P2327R1 - De-deprecating volatile compound operations
authorJakub Jelinek <jakub@redhat.com>
Tue, 16 Aug 2022 11:15:32 +0000 (13:15 +0200)
committerJakub Jelinek <jakub@redhat.com>
Mon, 29 Aug 2022 09:13:53 +0000 (11:13 +0200)
commit0ce3c8ea09d08469235c7c91975aab610bcda2c8
tree7d922e2acac87fd081412426f9d41b249e2b3171
parent030063c43f30a2335d3c03182df0beb82d003816
c++: Implement P2327R1 - De-deprecating volatile compound operations

From what I can see, this has been voted in as a DR and as it means
we warn less often than before in -std={gnu,c}++2{0,3} modes or with
-Wvolatile, I wonder if it shouldn't be backported to affected release
branches as well.

2022-08-16  Jakub Jelinek  <jakub@redhat.com>

* typeck.cc (cp_build_modify_expr): Implement
P2327R1 - De-deprecating volatile compound operations.  Don't warn
for |=, &= or ^= with volatile lhs.
* expr.cc (mark_use) <case MODIFY_EXPR>: Adjust warning wording,
leave out simple.

* g++.dg/cpp2a/volatile1.C: Adjust for de-deprecation of volatile
compound |=, &= and ^= operations.
* g++.dg/cpp2a/volatile3.C: Likewise.
* g++.dg/cpp2a/volatile5.C: Likewise.

(cherry picked from commit 6e790ca4615443fa395ac5cdba1ab6c87810985c)
gcc/cp/expr.cc
gcc/cp/typeck.cc
gcc/testsuite/g++.dg/cpp2a/volatile1.C
gcc/testsuite/g++.dg/cpp2a/volatile3.C
gcc/testsuite/g++.dg/cpp2a/volatile5.C
This page took 0.056098 seconds and 5 git commands to generate.