summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-10 22:11:48 +0000
committerzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-10 22:11:48 +0000
commited904873cc64506e905b5bc660dd7d5c5e6114a1 (patch)
treeb9f3ec47f84056695d8b4d47db1d42bd43f3e58c /gcc
parent4ebee9248132e2c9c0e3c3bb430db1ce602ad6d0 (diff)
downloadgcc-ed904873cc64506e905b5bc660dd7d5c5e6114a1.tar.gz
[gcc/cp/ChangeLog]
2004-09-10 Ziemowit Laski <zlaski@apple.com> * decl.c (objc_mark_locals_volatile): Make description of routine more descriptive; only mark VAR_DECLs at each binding level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87323 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 42660e8d9f6..ca0af251ce0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-10 Ziemowit Laski <zlaski@apple.com>
+
+ * 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 <rth@redhat.com>
PR c++/17386
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f2d8fc2f564..0aec597fefe 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;
+ }
}
}
}