This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Canonical types (1/3)
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: mark at codesourcery dot com
- Cc: doug dot gregor at gmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 04 Dec 2006 21:27:17 EST
- Subject: Re: [PATCH] Canonical types (1/3)
- References: <email@example.com> <4574C3CA.firstname.lastname@example.org>
> + 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.
> > + 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.