[cs] Robustify in the presence of PCH n snarf-n-barf

Geoff Keating geoffk@geoffk.org
Thu Oct 30 21:30:00 GMT 2003


This change is wrong, please make sure it never gets into mainline GCC.

Mike Stump <mrs@apple.com> writes:

> *** ./ggc-common.c.~1~	Wed Aug 13 15:21:30 2003
> --- ./ggc-common.c	Thu Oct 23 01:09:42 2003
> *************** gt_pch_note_object (void *obj, void *not
> *** 259,267 ****
> --- 259,279 ----
>   			      INSERT);
>     if (*slot != NULL)
>       {
> + #if 0
>         if ((*slot)->note_ptr_fn != note_ptr_fn
>   	  || (*slot)->note_ptr_cookie != note_ptr_cookie)
>   	abort ();
> + #else
> +       /* The static type of two pointers that point to the same
> + 	 location need not be the same.  What we want to do, is
> + 	 base<->super conversions, union conversions and so on...
> + 
> +          This case happens as c_include_struct is a tree in the
> + 	 TREE_CHAIN and a c_include_fragment* in
> + 	 defining_fragment.  */
> +       if ((*slot)->note_ptr_cookie != note_ptr_cookie)
> + 	abort ();
> + #endif
>         return 0;
>       }
>   
-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc-patches mailing list