aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2011-05-26 17:38:51 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2011-05-26 17:38:51 +0000
commit92e948a836d98e98a1721008795dfddbb47828a6 (patch)
treed221c28a4588d4ee669bca17061040874f839eab /gcc/c-family
parentd74be3171290547f3311f959351e0c3afe7dcd21 (diff)
downloadgcc-92e948a836d98e98a1721008795dfddbb47828a6.zip
gcc-92e948a836d98e98a1721008795dfddbb47828a6.tar.gz
gcc-92e948a836d98e98a1721008795dfddbb47828a6.tar.bz2
make TS_BLOCK a substructure of TS_BASE
make TS_BLOCK a substructure of TS_BASE gcc/ * tree.c (initialize_tree_contains_struct): Mark TS_BLOCK as TS_BASE instead of TS_COMMON. (find_decls_types_r): Check for TS_TYPED structure before looking at TREE_TYPE. * tree.h (struct tree_block): Inherit from tree_base, not tree_common. Add chain field. (BLOCK_CHAIN): Use new chain field. gcc/c-family/ * c-common.c (warning_candidate_p): Check for BLOCKs. gcc/java/ * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs. * expr.c (build_jni_stub): Likewise. From-SVN: r174300
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c-common.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index f9a38af..f15bd2f 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,5 +1,9 @@
2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
+ * c-common.c (warning_candidate_p): Check for BLOCKs.
+
+2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
+
* c-common.h (struct c_common_identifier): Inherit from tree_typed,
not tree_common.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 2d4e492..fa7ebc5 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -2367,6 +2367,9 @@ warning_candidate_p (tree x)
if (DECL_P (x) && DECL_ARTIFICIAL (x))
return 0;
+ if (TREE_CODE (x) == BLOCK)
+ return 0;
+
/* VOID_TYPE_P (TREE_TYPE (x)) is workaround for cp/tree.c
(lvalue_p) crash on TRY/CATCH. */
if (TREE_TYPE (x) == NULL_TREE || VOID_TYPE_P (TREE_TYPE (x)))