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: [PATCH] remove the unsigned_type language hook


> Something that would make more "sense" would be that the generic
> code substituted for this langhook has to handle the case that we
> ask for an unsigned variant of a subtype by making sure to make the
> unsigned subtype a subtype of the unsigned variant of the original
> basetype.  So (pseudocode)
>
>   if (TREE_TYPE (type))
>     TREE_TYPE (new_type) = unsigned_type_for (TREE_TYPE(type));

No, I can't believe that matters.  The issue is specific to the
modular type handling, not subtypes in general.  It would be odd for
these functions to ever return things that are subtypes at all.  But
modular types are an exception because that's a case where an Ada base
type is represented as a subtype due to the way modular types are encoded
for Ada.  But the middle-end shouldn't have to know about this, which is
why I think this code is only relevant for usage inside Gigi, not via the
lang hook.


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