aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-encoding.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-02-24 12:45:40 +0100
committerJakub Jelinek <jakub@redhat.com>2024-02-24 12:45:40 +0100
commitd8b74d0b1ce0d5c31fad7ef6aa970a9b7fa4e7be (patch)
treedbe3406dd0f65b324572c7541f8afbe4bbdf5984 /gcc/objc/objc-encoding.cc
parent5e7a176e88a2a37434cef9b1b6a37a4f8274854a (diff)
downloadgcc-d8b74d0b1ce0d5c31fad7ef6aa970a9b7fa4e7be.zip
gcc-d8b74d0b1ce0d5c31fad7ef6aa970a9b7fa4e7be.tar.gz
gcc-d8b74d0b1ce0d5c31fad7ef6aa970a9b7fa4e7be.tar.bz2
Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more
I've searched for some uses of (HOST_WIDE_INT) constant or (unsigned HOST_WIDE_INT) constant and turned them into uses of the appropriate macros. THere are quite a few cases in non-i386 backends but I've left that out for now. The only behavior change is in build_replicated_int_cst where the left shift was done in HOST_WIDE_INT type but assigned to unsigned HOST_WIDE_INT, which I've changed into unsigned HOST_WIDE_INT shift. 2024-02-24 Jakub Jelinek <jakub@redhat.com> gcc/ * builtins.cc (fold_builtin_isascii): Use HOST_WIDE_INT_UC macro. * combine.cc (make_field_assignment): Use HOST_WIDE_INT_1U macro. * double-int.cc (double_int::mask): Use HOST_WIDE_INT_UC macros. * genattrtab.cc (attr_alt_complement): Use HOST_WIDE_INT_1 macro. (mk_attr_alt): Use HOST_WIDE_INT_0 macro. * genautomata.cc (bitmap_set_bit, CLEAR_BIT): Use HOST_WIDE_INT_1 macros. * ipa-strub.cc (can_strub_internally_p): Use HOST_WIDE_INT_1 macro. * loop-iv.cc (implies_p): Use HOST_WIDE_INT_1U macro. * pretty-print.cc (test_pp_format): Use HOST_WIDE_INT_C and HOST_WIDE_INT_UC macros. * rtlanal.cc (nonzero_bits1): Use HOST_WIDE_INT_UC macro. * tree.cc (build_replicated_int_cst): Use HOST_WIDE_INT_1U macro. * tree.h (DECL_OFFSET_ALIGN): Use HOST_WIDE_INT_1U macro. * tree-ssa-structalias.cc (dump_varinfo): Use ~HOST_WIDE_INT_0U macros. * wide-int.cc (divmod_internal_2): Use HOST_WIDE_INT_1U macro. * config/i386/constraints.md (define_constraint "L"): Use HOST_WIDE_INT_C macro. * config/i386/i386.md (movabsq split peephole2): Use HOST_WIDE_INT_C macro. (movl + movb peephole2): Likewise. * config/i386/predicates.md (x86_64_zext_immediate_operand): Likewise. (const_32bit_mask): Likewise. gcc/objc/ * objc-encoding.cc (encode_array): Use HOST_WIDE_INT_0 macros.
Diffstat (limited to 'gcc/objc/objc-encoding.cc')
-rw-r--r--gcc/objc/objc-encoding.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/objc/objc-encoding.cc b/gcc/objc/objc-encoding.cc
index 18a3ea6..7cb0e5a 100644
--- a/gcc/objc/objc-encoding.cc
+++ b/gcc/objc/objc-encoding.cc
@@ -391,10 +391,10 @@ encode_array (tree type, int curtype, int format)
/* Else, we are in a struct, and we encode it as a zero-length
array. */
- sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)0);
+ sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_0);
}
else if (TREE_INT_CST_LOW (TYPE_SIZE (array_of)) == 0)
- sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)0);
+ sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_0);
else
sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC,
TREE_INT_CST_LOW (an_int_cst)