diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-26 17:38:51 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-26 17:38:51 +0000 |
commit | 027fc6effed44ed55e1c2214a28b5b664dc00178 (patch) | |
tree | d221c28a4588d4ee669bca17061040874f839eab /gcc/c-family | |
parent | 8f2b914f9827988da22710ae55eecfeb7c12aee0 (diff) | |
download | gcc-027fc6effed44ed55e1c2214a28b5b664dc00178.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174300 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index f9a38af4b3c..f15bd2f9f4b 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 2d4e4927c74..fa7ebc5d30d 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))) |