[PATCH] remove the unsigned_type language hook

Rafael Espindola espindola@google.com
Thu May 3 09:42:00 GMT 2007


The attached patch removes the remaining parts of the unsigned_type
language hook. It depends on my previous patch that adds a default
implementation.

Compiled and regression tested with all languages (including ada).

OK for trunk?

gcc/ada/ChangeLog
 * gcc/ada/gigi.h (gnat_unsigned_type): Remove.
 * gcc/ada/misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
 * gcc/ada/trans.c (gnat_to_gnu): Use get_unsigned_type instead of
gnat_unsigned_type.
                           (convert_with_check): Likewise.
 * gcc/ada/utils.c (gnat_unsigned_type): Remove.

gcc/ChangeLog
 * gcc/c-common.c (warnings_for_convert_and_check): Use
get_unsigned_type instead of c_common_unsigned_type
                            (c_common_unsigned_type): Remove.
                            (shorten_compare): Use
c_common_signed_or_unsigned_type instead of c_common_unsigned_type.
                           (c_common_nodes_and_builtins): Use
get_unsigned_type instead of c_common_unsigned_type.
 * gcc/c-common.h (c_common_unsigned_type): Remove.
 * gcc/c-decl.c (grokdeclarator): Use c_common_unsigned_type instead
of get_unsigned_type.
 * gcc/c-format.c (check_format_types): Likewise.
 * gcc/c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
 * gcc/c-typeck.c (convert_for_assignment): Use get_unsigned_type
instead of c_common_unsigned_type.
 * gcc/convert.c (convert_to_integer): Likewise.
 * gcc/expmed.c (make_tree): Use get_unsigned_type instead of
lang_hooks.types.unsigned_type.
 * gcc/fold-const.c (fold_negate_expr): Likewise.
                           (build_range_check): Likewise.
                           (fold_unary): Likewise.
                           (fold_binary): Likewise.
                           (fold_ternary): Likewise.
 * gcc/langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
                                 (LANG_HOOKS_FOR_TYPES_INITIALIZER):
Remove LANG_HOOKS_UNSIGNED_TYPE.
 * gcc/langhooks.h (lang_hooks_for_types): Remove unsigned_type
 * gcc/tree.c (unsigned_type_for): Use get_unsigned_type instead of
lang_hooks.types.unsigned_type

gcc/cp/ChangeLog
 * gcc/cp/cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
 * gcc/cp/decl.c (grokdeclarator): Replace c_common_unsigned_type with
get_unsigned_type.

-- 
Rafael Avila de Espindola

Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland

Registered in Dublin, Ireland
Registration Number: 368047
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-unsigned-type.patch
Type: text/x-patch
Size: 15105 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070503/eb8d8bc7/attachment.bin>


More information about the Gcc-patches mailing list