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]

C++ PATCH for c++/9167


cp_build_parm_decl didn't get the right type for DECL_ARG_TYPE because the
type wasn't complete yet.  This is where we fix up DECL_MODE for such
parms, so it seems like the right place to fix DECL_ARG_TYPE as well.

Test in g++.dg/init/inline1.C.  Tested i686-pc-linux-gnu.  Applied to trunk
and 3.3.

2003-01-17  Jason Merrill  <jason@redhat.com>

	PR c++/9167, c++/9358
	* decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.

*** decl.c.~1~	2003-01-17 18:14:23.000000000 -0500
--- decl.c	2003-01-17 18:12:11.000000000 -0500
*************** require_complete_types_for_parms (tree p
*** 11828,11834 ****
          /* grokparms will have already issued an error */
          TREE_TYPE (parms) = error_mark_node;
        else if (complete_type_or_else (TREE_TYPE (parms), parms))
! 	layout_decl (parms, 0);
        else
          TREE_TYPE (parms) = error_mark_node;
      }
--- 11828,11837 ----
          /* grokparms will have already issued an error */
          TREE_TYPE (parms) = error_mark_node;
        else if (complete_type_or_else (TREE_TYPE (parms), parms))
! 	{
! 	  layout_decl (parms, 0);
! 	  DECL_ARG_TYPE (parms) = type_passed_as (TREE_TYPE (parms));
! 	}
        else
          TREE_TYPE (parms) = error_mark_node;
      }

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