From: Rainer Orth Date: Tue, 7 May 2019 07:44:55 +0000 (+0000) Subject: Fix Solaris bootstrap: lto-common.c, lto-dump.c format mismatches X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=03de2955128860f04bd371b71e0f23b4498c94e2;p=gcc.git Fix Solaris bootstrap: lto-common.c, lto-dump.c format mismatches * lto-common.c (lto_file_read): Print section->start as int64_t, section->len as uint64_t. * lto-dump.c (symbol_entry::dump): Print sz as uint64_t. From-SVN: r270935 --- diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index f7b177f0175..942b4b51e10 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2019-05-07 Rainer Orth + + * lto-common.c (lto_file_read): Print section->start as int64_t, + section->len as uint64_t. + * lto-dump.c (symbol_entry::dump): Print sz as uint64_t. + 2019-05-06 Martin Liska * lto-common.c: Update coding style. diff --git a/gcc/lto/lto-common.c b/gcc/lto/lto-common.c index aa64d8b779e..078075ccd48 100644 --- a/gcc/lto/lto-common.c +++ b/gcc/lto/lto-common.c @@ -2111,8 +2111,9 @@ lto_file_read (lto_file *file, FILE *resolution_file, int *count) fprintf (stdout, "\n LTO Object Name: %s\n", file->filename); fprintf (stdout, "\nNo. Offset Size Section Name\n\n"); for (section = section_list.first; section != NULL; section = section->next) - fprintf (stdout, "%2d %8ld %8ld %s\n", - ++i, section->start, section->len, section->name); + fprintf (stdout, "%2d %8" PRId64 " %8" PRIu64 " %s\n", + ++i, (int64_t) section->start, (uint64_t) section->len, + section->name); } /* Find all sub modules in the object and put their sections into new hash diff --git a/gcc/lto/lto-dump.c b/gcc/lto/lto-dump.c index d23d346d0d6..39b442335f6 100644 --- a/gcc/lto/lto-dump.c +++ b/gcc/lto/lto-dump.c @@ -60,7 +60,8 @@ struct symbol_entry const char *type_name = node->get_symtab_type_string (); const char *visibility = node->get_visibility_string (); size_t sz = get_size (); - printf ("%s %s %4lu %s ", type_name, visibility, sz, name); + printf ("%s %s %4" PRIu64 " %s ", type_name, visibility, (uint64_t) sz, + name); } };