From f749f3c20da104deba8c86dda00198643c3ddc94 Mon Sep 17 00:00:00 2001 From: Ziemowit Laski Date: Fri, 10 Sep 2004 22:11:48 +0000 Subject: decl.c (objc_mark_locals_volatile): Make description of routine more descriptive... [gcc/cp/ChangeLog] 2004-09-10 Ziemowit Laski * decl.c (objc_mark_locals_volatile): Make description of routine more descriptive; only mark VAR_DECLs at each binding level. From-SVN: r87323 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 42660e8..ca0af25 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-09-10 Ziemowit Laski + + * decl.c (objc_mark_locals_volatile): Make description of + routine more descriptive; only mark VAR_DECLs at each + binding level. + 2004-09-10 Richard Henderson PR c++/17386 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f2d8fc2..0aec597 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -414,7 +414,9 @@ objc_get_current_scope (void) /* The following routine is used by the NeXT-style SJLJ exceptions; variables get marked 'volatile' so as to not be clobbered by - _setjmp()/_longjmp() calls. */ + _setjmp()/_longjmp() calls. All variables in the current scope, + as well as parent scopes up to (but not including) ENCLOSING_BLK + shall be thusly marked. */ void objc_mark_locals_volatile (void *enclosing_blk) @@ -429,8 +431,11 @@ objc_mark_locals_volatile (void *enclosing_blk) for (decl = scope->names; decl; decl = TREE_CHAIN (decl)) { - DECL_REGISTER (decl) = 0; - TREE_THIS_VOLATILE (decl) = 1; + if (TREE_CODE (decl) == VAR_DECL) + { + DECL_REGISTER (decl) = 0; + TREE_THIS_VOLATILE (decl) = 1; + } } } } -- cgit v1.1