decl.c (objc_mark_locals_volatile): Make description of routine more descriptive...
authorZiemowit Laski <zlaski@apple.com>
Fri, 10 Sep 2004 22:11:48 +0000 (22:11 +0000)
committerZiemowit Laski <zlaski@gcc.gnu.org>
Fri, 10 Sep 2004 22:11:48 +0000 (22:11 +0000)
[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.

From-SVN: r87323

gcc/cp/ChangeLog
gcc/cp/decl.c

index 42660e8d9f63cda98237fa5d546ccfa485bc46eb..ca0af251ce08340cc7425a5aa4c300c39d389490 100644 (file)
@@ -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
index f2d8fc2f564ce81a9b47cc8d55131c8ef2cba04c..0aec597fefe11bd67902788bb4ec9a1f7c153539 100644 (file)
@@ -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;
+           }
         }
     }
 }