[C++ PATCH] Fix 2368

Nathan Sidwell nathan@codesourcery.com
Fri Apr 27 06:35:00 GMT 2001


Hi,
I've installed this obvious patch on both mainline and branch
which fixes 2.95 regression 2368.

We try and warn about shadowed catchers, but should only do so on
real classes, not things which might be classes (like template types).

built & tested on i686-pc-linux-gnu.

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2001-04-26  Nathan Sidwell <nathan@codesourcery.com>

	* except.c (can_convert_eh): Don't check template parms,
	typename types etc.

Index: cp/except.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/except.c,v
retrieving revision 1.129
diff -c -3 -p -r1.129 except.c
*** except.c	2001/04/22 23:50:06	1.129
--- except.c	2001/04/26 15:36:18
*************** can_convert_eh (to, from)
*** 821,827 ****
        /* else fall through */
      }
  
!   if (IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from)
        && PUBLICLY_UNIQUELY_DERIVED_P (to, from))
      return 1;
  
--- 821,827 ----
        /* else fall through */
      }
  
!   if (CLASS_TYPE_P (to) && CLASS_TYPE_P (from)
        && PUBLICLY_UNIQUELY_DERIVED_P (to, from))
      return 1;
  


More information about the Gcc-patches mailing list