C++ patch for try/catch in exception members

Chip Salzenberg chip@perlsupport.com
Sun Aug 29 15:09:00 GMT 1999


The attached C++ source file is condensed from a part of libstdc++ v3.
When compiled with the current CVS sources (8/29), it triggers a
spurious complaint about default template parameters.

I think this fix is appropriate; it certainly kills the complaint.

--------------------------------------------------------------------
1999-08-29  Chip Salzenberg  <chip@pobox.com>

	* except.c (expand_start_catch_block): Test
	PROCESSING_REAL_TEMPLATE_DECL_P() before calling
	push_template_decl()

Index: gcc/cp/except.c
*************** expand_start_catch_block (declspecs, dec
*** 525,529 ****
  	  decl = grokdeclarator (declarator, declspecs, CATCHPARM,
  				 1, NULL_TREE);
! 	  if (processing_template_decl)
  	    decl = push_template_decl (decl);
  	  pushdecl (decl);
--- 525,529 ----
  	  decl = grokdeclarator (declarator, declspecs, CATCHPARM,
  				 1, NULL_TREE);
! 	  if (PROCESSING_REAL_TEMPLATE_DECL_P())
  	    decl = push_template_decl (decl);
  	  pushdecl (decl);
--------------------------------------------------------------------

-- 
Chip Salzenberg      - a.k.a. -      <chip@perlsupport.com>
      "When do you work?"   "Whenever I'm not busy."


More information about the Gcc-bugs mailing list