(C++) yet another type access control patch
Jason Merrill
jason@cygnus.com
Wed Feb 23 12:24:00 GMT 2000
Fixes g++.other/access10.C.
2000-02-23 Jason Merrill <jason@casey.cygnus.com>
* decl.c (grokdeclarator): Call decl_type_access_control.
* parse.y (parse_end_decl): Don't call decl_type_access_control if
decl is null.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.551
diff -c -p -r1.551 decl.c
*** decl.c 2000/02/23 17:25:29 1.551
--- decl.c 2000/02/23 20:20:08
*************** grokdeclarator (declarator, declspecs, d
*** 9296,9301 ****
--- 9296,9302 ----
decl = start_decl (declarator, declspecs, 1,
attributes, prefix_attributes);
+ decl_type_access_control (decl);
if (decl)
{
/* Look for __unused__ attribute */
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/parse.y,v
retrieving revision 1.165
diff -c -p -r1.165 parse.y
*** parse.y 2000/02/22 07:25:30 1.165
--- parse.y 2000/02/23 20:20:15
*************** static void
*** 151,157 ****
parse_end_decl (decl, init, asmspec)
tree decl, init, asmspec;
{
! decl_type_access_control (decl);
cp_finish_decl (decl, init, asmspec, init ? LOOKUP_ONLYCONVERTING : 0);
}
--- 151,160 ----
parse_end_decl (decl, init, asmspec)
tree decl, init, asmspec;
{
! /* If decl is NULL_TREE, then this was a variable declaration using
! () syntax for the initializer, so we handled it in grokdeclarator. */
! if (decl)
! decl_type_access_control (decl);
cp_finish_decl (decl, init, asmspec, init ? LOOKUP_ONLYCONVERTING : 0);
}
More information about the Gcc-patches
mailing list