aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-06-22 20:19:03 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2001-06-22 20:19:03 +0100
commitf9e1917eb31a9c2975eabe980cbedfb44571ad6f (patch)
tree37a3f447efcf42662b23e1928c635f11d08eafcb /gcc/c-common.c
parent9e2f7ec7e5f627299087530e4a499cd609ee453c (diff)
downloadgcc-f9e1917eb31a9c2975eabe980cbedfb44571ad6f.zip
gcc-f9e1917eb31a9c2975eabe980cbedfb44571ad6f.tar.gz
gcc-f9e1917eb31a9c2975eabe980cbedfb44571ad6f.tar.bz2
re PR c/3259 (({ }) and -Wall)
* c-common.c (verify_tree): Check for x being NULL. * doc/c-tree.texi: Document COMPOUND_BODY of an empty COMPOUND_STMT. Fixes PR c/3259. testsuite: * gcc.dg/20010622-1.c: New test. From-SVN: r43508
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 2c079e0..0990f23 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1592,6 +1592,11 @@ verify_tree (x, pbefore_sp, pno_sp, writer)
enum tree_code code;
char class;
+ /* X may be NULL if it is the operand of an empty statement expression
+ ({ }). */
+ if (x == NULL)
+ return;
+
restart:
code = TREE_CODE (x);
class = TREE_CODE_CLASS (code);