This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Teach gimple_canonical_types_compatible_p about incomplete types


> 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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]