This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] remove the unsigned_type language hook
On 5/9/07, Rafael Espindola <espindola@google.com> wrote:
On 5/9/07, Eric Botcazou <ebotcazou@adacore.com> wrote:
> > * gcc/ada/misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
>
> This part is OK, thanks.
Thanks.
Can someone review the patch that adds a default implementation
(http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01681.html)? This will
get it started and make the rest of the patch easier to review. If
someone can approve the full patch it would be even better :-)
I think the frontends should use unsigned_type_for (), not the default
implementation for the langhook directly. So the final transition would
be simply to make the default implementation inside unsigned_type_for ().
I wonder why we ended up with this langhook duplication anyway...:
/* Given an integer type T, return a type like T but unsigned.
If T is unsigned, the value is T. */
tree (*unsigned_type) (tree);
/* Given an integer type T, return a type like T but signed.
If T is signed, the value is T. */
tree (*signed_type) (tree);
/* Return a type the same as TYPE except unsigned or signed
according to UNSIGNEDP. */
tree (*signed_or_unsigned_type) (int, tree);
!?
Richard.