From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Macleod To: hjl@lucon.org Cc: egcs@cygnus.com Subject: Re: A patch for g++ Date: Thu, 07 May 1998 17:39:00 -0000 Message-id: <199805072141.OAA15262@rtl.cygnus.com> X-SW-Source: 1998-05/msg00254.html >> Hi, >> >> Your change: >> >> Tue May 5 18:24:13 EDT 1998 Andrew MacLeod >> >> * method.c: Add a call to build_type_variant to get the right type. >> >> breaks c++. A testcase is enclosed here. The patch below seems to fix >> the bug for me. Can you take a look at it? It was already broken.. this fixed some of it, but apparently not all, and caused other things to break. Figures :-) Thanks for the testcase and the patch. I elected to change the area where the other TREE_USED flags are zeroed out instead, so its all done in one place. I have applied the patch to egcs. Andrew >> BTW, is_java_type () is not declared anywhere. >> It should be defined on line 1142 of method.c: int is_java_type (type) tree type; { ... (btw I applied the following:) Index: method.c =================================================================== RCS file: /cvs/cvsfiles/devo/gcc/cp/method.c,v retrieving revision 1.190 diff -c -p -r1.190 method.c *** method.c 1998/05/05 22:31:48 1.190 --- method.c 1998/05/07 21:24:26 *************** build_decl_overload_real (dname, parms, *** 1620,1626 **** typevec = NULL; while (t) { ! TREE_USED (TREE_VALUE (t)) = 0; t = TREE_CHAIN (t); } } --- 1620,1631 ---- typevec = NULL; while (t) { ! tree temp = TREE_VALUE (t); ! TREE_USED (temp) = 0; ! /* clear out the type variant in case we used it */ ! temp = build_type_variant (TYPE_MAIN_VARIANT (temp), ! TYPE_READONLY (temp), TYPE_VOLATILE (temp)); ! TREE_USED (temp) = 0; t = TREE_CHAIN (t); } }