From: Iain Buclaw Date: Thu, 18 Nov 2021 21:43:40 +0000 (+0100) Subject: d: Use HOST_WIDE_INT for type size temporaries. X-Git-Tag: basepoints/gcc-13~2926 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6ec661e3931773e2f571ed4f6dd8b0402d8687d;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index 0d46ee180e75..9c9205fa349a 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -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) {