This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Fix PR13262 regression (static member init accesschecking)


On Mon, 15 Dec 2003 19:12:45 +0700 (ICT), Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> wrote:

> This patch fixes PR13262 which is marked as regression in 3.3 and 3.4
> (only because we didn't do much access checking in 3.2).  Inside
> function instantiate_decl, we need to setup scope before calling 
> cp_finish_decl because it may call constructors while building
> initialization code for this DECL, requiring access checking.  Too bad
> cp_finish_decl has some magic that pop the scope in most cases and 
> we have to pop it here for the remaining cases (they are commented
> in the patch.

Why not use the same logic as start_decl, and only push if the type is
complete?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]