d: Use HOST_WIDE_INT for type size temporaries.
These variables are later used as the value for the format specifier `%wd`, which the expected type may not match dinteger_t, causing unnecessary -Wformat warnings. gcc/d/ChangeLog: * decl.cc (d_finish_decl): Use HOST_WIDE_INT for type size temporaries.
This commit is contained in:
parent
93810fd673
commit
d6ec661e39
@ -1544,8 +1544,9 @@ d_finish_decl (tree decl)
|
||||
if (flag_checking && DECL_INITIAL (decl))
|
||||
{
|
||||
/* Initializer must never be bigger than symbol size. */
|
||||
dinteger_t tsize = int_size_in_bytes (TREE_TYPE (decl));
|
||||
dinteger_t dtsize = int_size_in_bytes (TREE_TYPE (DECL_INITIAL (decl)));
|
||||
HOST_WIDE_INT tsize = int_size_in_bytes (TREE_TYPE (decl));
|
||||
HOST_WIDE_INT dtsize =
|
||||
int_size_in_bytes (TREE_TYPE (DECL_INITIAL (decl)));
|
||||
|
||||
if (tsize < dtsize)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user