This is the mail archive of the 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]

C++ PATCH for my own stupidity

The bootstrap problem with libstdc++ was caused by a failure to check
in one of the files I had changed.  I always name all the files to be
committed to be sure that I do not include too many; in this case,
this strategy stung me.

I have should have recognized this problem right away when it didn't
happen on my local machine, but did occur elsewhere.

I have checked in a new cp/semantics.c, which fixes the problem.


Mark Mitchell
Mark Mitchell Consulting

1999-03-10  Mark Mitchell  <>

	* semantics.c (begin_class_definition): Call build_self_reference.
	(finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.

Index: semantics.c
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/semantics.c,v
retrieving revision 1.41
diff -c -p -r1.41 semantics.c
*** semantics.c	1999/02/26 23:37:01	1.41
--- semantics.c	1999/03/11 01:57:05
*************** begin_class_definition (t)
*** 1327,1332 ****
--- 1327,1335 ----
       that we can get it back later.  */
    begin_tree ();
+   /* Make a declaration for this class in its own scope.  */
+   build_self_reference ();
    return t;
*************** finish_member_declaration (decl)
*** 1365,1375 ****
         finish_struct.  Presumably it is already set as the function is
         parsed.  Perhaps DECL_CLASS_CONTEXT is already set, too?  */
      DECL_CLASS_CONTEXT (decl) = current_class_type;
-   else if (TREE_CODE (decl) == TYPE_DECL)
-     /* Historically, DECL_CONTEXT was not set for a TYPE_DECL in
-        finish_struct, so we do not do it here either.  Perhaps we
-        should, though.  */
-       ;
      DECL_CONTEXT (decl) = current_class_type;
--- 1368,1373 ----

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