diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-11-03 15:06:42 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@physics.uc.edu> | 2005-11-03 15:06:42 +0000 |
commit | 1c57482fb883d5738b9c1b29a4089dbe938128fb (patch) | |
tree | 677adb6581b12a2ebb71ea2b3137935794902c49 /gcc/cp | |
parent | 984b5fe389432120a973aaae928f91c39faf4f44 (diff) |
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/24582
* g++.dg/init/switch1.C: New test.
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/24582
* decl.c (declare_local_label): Return 0 for variables
with error_mark_node as their types.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@106434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eb52015cab7..e1edc45cbb7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-11-03 Andrew Pinski <pinskia@physics.uc.edu> + + PR c++/24582 + * decl.c (declare_local_label): Return 0 for variables + with error_mark_node as their types. + 2005-11-02 Mark Mitchell <mark@codesourcery.com> PR c++/22434 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 7e38ec3dff1..c5fe6585996 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2147,7 +2147,8 @@ declare_local_label (tree id) static int decl_jump_unsafe (tree decl) { - if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl)) + if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl) + || TREE_TYPE (decl) == error_mark_node) return 0; if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)) |