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: Re: [PATCH] Canonical types (1/3)


On 12/4/06, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
> +  if (TYPE_CANONICAL (to_type) != to_type)
> +    TYPE_CANONICAL (t) =
> +      build_pointer_type_for_mode (TYPE_CANONICAL (to_type),
> +                                mode, can_alias_all);

Minor issue: the "=" is on the wrong line.

Ah, thanks.


> > +      type = build_variant_type_copy (orig_type);
> >        TYPE_ALIGN (type) = boundary;
> > +      TYPE_CANONICAL (type) = TYPE_CANONICAL (orig_type);
>
> Eek.  So, despite having different alignments, we consider these types
> "the same"?  If that's what we already do, then it's OK to preserve that
> behavior, but it sure seems worrisome.

I'm concerned about that as well.  I think we need a more precise definition
someplace of what is allowed to differ between two "variants" of a type.

I've been following whatever "comptypes" does, because that's the behavior canonical types need to mimic to provide the same behavior that we have now.

 Cheers,
 Doug


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