This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Teach gimple_canonical_types_compatible_p about incomplete types
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Joseph Myers <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Sat, 30 May 2015 21:13:29 +0200
- Subject: Re: Teach gimple_canonical_types_compatible_p about incomplete types
- Authentication-results: sourceware.org; auth=none
- References: <20150524234944 dot GB71623 at kam dot mff dot cuni dot cz> <616E26E8-0AAF-4A31-A38A-AC40EAF13D12 at gmail dot com> <20150526001604 dot GA43680 at kam dot mff dot cuni dot cz> <alpine dot DEB dot 2 dot 10 dot 1505292052250 dot 17156 at digraph dot polyomino dot org dot uk> <20150529211758 dot GA51555 at kam dot mff dot cuni dot cz> <20150529225626 dot GA24506 at kam dot mff dot cuni dot cz> <B59BF170-F941-4E9E-9CAE-539738AD23DE at gmail dot com>
> On May 30, 2015 12:56:26 AM GMT+02:00, Jan Hubicka <hubicka@ucw.cz> wrote:
>
> >Index: tree.h
> >===================================================================
> >--- tree.h (revision 223877)
> >+++ tree.h (working copy)
> >@@ -4598,7 +4598,28 @@
> > extern void DEBUG_FUNCTION verify_type (const_tree t);
> >extern bool gimple_canonical_types_compatible_p (const_tree,
> >const_tree,
> > bool trust_type_canonical = true);
> >+/* Return simplified tree code of type that is used for canonical type
> >merging. */
> >+inline enum tree_code
> >+tree_code_for_canonical_type_merging (enum tree_code code)
> >+{
> >+ /* By C standard, each enumerated type shall be compatible with
> >char,
> >+ a signed integer, or an unsigned integer. The choice of type is
> >+ implementation defined (in our case it depends on -fshort-enum).
>
> Please drop the mention of -fshort-enum as Joseph clarified.
I think the comment there is correct -fshort-enum will make us to pick different
integer types based on number of values, but they will always interoperable with
some normal integer type.
Honza
>
> thanks,