diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-29 00:06:19 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-29 00:06:19 +0000 |
commit | 528c22f4c7be52c1a285c7b0b9e49180ba8785f6 (patch) | |
tree | 6d48fb1dbe790d1dad791c358f506aa2a1dc427c /gcc/c-common.c | |
parent | 5a2f8dcf2504d2d757e8896e502f1ded6e35db89 (diff) | |
download | gcc-528c22f4c7be52c1a285c7b0b9e49180ba8785f6.zip gcc-528c22f4c7be52c1a285c7b0b9e49180ba8785f6.tar.gz gcc-528c22f4c7be52c1a285c7b0b9e49180ba8785f6.tar.bz2 |
re PR c/18050 (-Wsequence-point reports false positives)
2008-08-28 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
Andrew Pinski <pinskia@gcc.gnu.org>
PR 18050
* c-common.c (verify_tree): Fix handling of ADDR_EXPR.
testsuite/
* gcc.dg/Wsequence-point-pr18050.c: New.
* g++.dg/warn/Wsequence-point-pr18050.C: New.
Co-Authored-By: Andrew Pinski <pinskia@gcc.gnu.org>
From-SVN: r139742
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index e0a0829..4493a4b 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2189,6 +2189,13 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp, return; } + case ADDR_EXPR: + x = TREE_OPERAND (x, 0); + if (DECL_P (x)) + return; + writer = 0; + goto restart; + default: /* For other expressions, simply recurse on their operands. Manual tail recursion for unary expressions. |