diff options
author | Marek Polacek <polacek@redhat.com> | 2015-12-15 15:13:49 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-12-15 15:13:49 +0000 |
commit | 2994fb91b7df8f8a0c0f83024c240f25f78f25a0 (patch) | |
tree | 4754cc1722a0b8dfa443bdb17e5fb5e5f5efc61d /gcc/c | |
parent | 4a38b02b4ed0b6d58e1773072daff795eb244829 (diff) | |
download | gcc-2994fb91b7df8f8a0c0f83024c240f25f78f25a0.zip gcc-2994fb91b7df8f8a0c0f83024c240f25f78f25a0.tar.gz gcc-2994fb91b7df8f8a0c0f83024c240f25f78f25a0.tar.bz2 |
re PR c/68907 (bogus warning: right-hand operand of comma expression has no effect on an atomic_int preincrement)
PR c/68907
* c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
artificial decl.
* gcc.dg/pr68907.c: New test.
From-SVN: r231656
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 2ba9464..e61a2ed 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2015-12-15 Marek Polacek <polacek@redhat.com> + + PR c/68907 + * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an + artificial decl. + 2015-12-08 David Malcolm <dmalcolm@redhat.com> * c-parser.c (c_parser_alignof_expression): Capture location of diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index b691072..9d6c604 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -3814,6 +3814,7 @@ build_atomic_assign (location_t loc, tree lhs, enum tree_code modifycode, newval = create_tmp_var_raw (nonatomic_lhs_type); newval_addr = build_unary_op (loc, ADDR_EXPR, newval, 0); TREE_ADDRESSABLE (newval) = 1; + TREE_NO_WARNING (newval) = 1; loop_decl = create_artificial_label (loc); loop_label = build1 (LABEL_EXPR, void_type_node, loop_decl); |