semantics.c (simplify_aggr_init_exprs_r): Don't restore flag_access_control from...
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Wed, 18 Apr 2001 07:55:09 +0000 (07:55 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 18 Apr 2001 07:55:09 +0000 (07:55 +0000)
* semantics.c (simplify_aggr_init_exprs_r): Don't restore
flag_access_control from uninitialized storage.

From-SVN: r41408

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 7809c0a286c4325f040efb9e613abcdb1abcebea..37f32279a825720b14f73dd4c946e59e7aada75d 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * semantics.c (simplify_aggr_init_exprs_r): Don't restore
+       flag_access_control from uninitialized storage.
+
 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
index a6e13ec0f7876f25c5ce746a8402d7aeea4cb745..87dd778450c4e56a3019f8a353f8c52de0df223c 100644 (file)
@@ -2298,7 +2298,7 @@ simplify_aggr_init_exprs_r (tp, walk_subtrees, data)
 #ifdef PCC_STATIC_STRUCT_RETURN  
   if (!AGGR_INIT_VIA_CTOR_P (aggr_init_expr) && aggregate_value_p (type))
     {
-      int old_ac;
+      int old_ac = flag_access_control;
 
       flag_access_control = 0;
       call_expr = build_aggr_init (slot, call_expr, LOOKUP_ONLYCONVERTING);