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]

Re: g++ memory bug.


This situation is similar to the one for synthesized methods, though there
the user doesn't have any ability to prevent them from being inline.  So I
ended up piggybacking on -finline-functions:

      if (DECL_ARTIFICIAL (fndecl))
	{
	  /* Do we really *want* to inline this synthesized method?  */

	  int save_fif = flag_inline_functions;
	  flag_inline_functions = 1;

	  /* Turn off DECL_INLINE for the moment so function_cannot_inline_p
	     will check our size.  */
	  DECL_INLINE (fndecl) = 0;

	  rest_of_compilation (fndecl);
	  flag_inline_functions = save_fif;
	}

These two issues should use the same mechanism, though I would welcome a
cleaner one than my hack above.

Jason


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