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 to note_decl_for_pch for c++/28217


28217 is a problem whereby something that compiles fine normally doesn't compile for a PCH, because the PCH code is being too aggressive about trying to premangle decls to save work later. We never mangle uninstantiated templates, so it shouldn't try.

Tested x86_64-pc-linux-gnu, applied to trunk.

2006-07-12  Jason Merrill  <jason@redhat.com>

	PR c++/28217
	* semantics.c (note_decl_for_pch): Don't premangle templates.

Index: semantics.c
===================================================================
*** semantics.c	(revision 115202)
--- semantics.c	(working copy)
*************** note_decl_for_pch (tree decl)
*** 2335,2342 ****
  
    /* There's a good chance that we'll have to mangle names at some
       point, even if only for emission in debugging information.  */
!   if (TREE_CODE (decl) == VAR_DECL
!       || TREE_CODE (decl) == FUNCTION_DECL)
      mangle_decl (decl);
  }
  
--- 2335,2343 ----
  
    /* There's a good chance that we'll have to mangle names at some
       point, even if only for emission in debugging information.  */
!   if ((TREE_CODE (decl) == VAR_DECL
!        || TREE_CODE (decl) == FUNCTION_DECL)
!       && !processing_template_decl)
      mangle_decl (decl);
  }
  

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