C: Drop qualifiers of assignment expressions. [PR98047]
authorMartin Uecker <muecker@gwdg.de>
Wed, 16 Dec 2020 22:47:52 +0000 (23:47 +0100)
committerMartin Uecker <muecker@gwdg.de>
Wed, 16 Dec 2020 22:51:25 +0000 (23:51 +0100)
commit58a45ce44a9acf3d15fada265d2a391a8e1bc960
tree69fbd5b87d917a812ff0d60a679afcf7d34d8d34
parentec13758ed41936bf803640f0dd8c259c034fe4b9
C: Drop qualifiers of assignment expressions. [PR98047]

ISO C17 6.5.15.1 specifies that the result is the
type the LHS would have after lvalue conversion.

2020-12-16  Martin Uecker  <muecker@gwdg.de>

gcc/c/
PR c/98047
* c-typeck.c (build_modify_expr): Drop qualifiers.

gcc/testsuite/
PR c/98047
* gcc.dg/qual-assign-7.c: New test.
gcc/c/c-typeck.c
gcc/testsuite/gcc.dg/qual-assign-7.c [new file with mode: 0644]