From f9e1917eb31a9c2975eabe980cbedfb44571ad6f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 22 Jun 2001 20:19:03 +0100 Subject: 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 --- gcc/c-common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/c-common.c') 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); -- cgit v1.1