On Tue, May 7, 2019 at 9:32 AM Rainer Orth <r...@cebitec.uni-bielefeld.de> 
wrote:
>
> Hi Richard,
>
> > On Mon, May 6, 2019 at 10:39 PM Jakub Jelinek <ja...@redhat.com> wrote:
> >>
> >> On Mon, May 06, 2019 at 08:46:05PM +0200, Richard Biener wrote:
> >> > >Fixed as follows.  i386-pc-solaris2.11 bootstrap has completed with
> >> > >this
> >> > >patch, sparc-sun-solaris2.11 is running the testsuite and
> >> > >x86_64-pc-linux-gnu is building the runtime libs.
> >> > >
> >> > >Ok for mainline?
> >> >
> >> > Can you use the PRI* format macros to match the types instead?
> >>
> >> Is that sufficiently portable though?
> >> I mean, for PRI[diouxX]64 we redefine those macros in hwint.h if needed.
> >> But we don't have anything similar for PRI[diouxX]PTR if inttypes.h
> >> is not available, and for size_t there isn't even any PRI* macro at all.
> >
> > Use those that hwint.h provides - casting the value should be done as a last
> > resort.  Adding PRI[diouxX]PTR macros in hwint.h might be useful, I merely
> > added those that I wanted to use.
> >
> > True, size_t is always a problem :/  Having something in hwint.h would
> > be useful though - I see the C standard is lacking here.
>
> this is what I bootstrapped successfully last night on
> i386-pc-solaris2.11 and x86_64-pc-linux-gnu.  I didn't feel like adding
> PRI?PTR fallback definitions for the single use of intptr_t, though, and
> am not really sure this is an improvement over my original patch.

Hmm, indeed.  I think in the end some printing support for size_t
is needed.  The use of intptr_t itself is probably somewhat bogus
and off_t should have been used (with the very same issue of course).
Or both should have been [u]int64_t from the start. Anyway sth to clean
up for LTO folks.

Patch is OK.

Richard.

>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2019-05-06  Rainer Orth  <r...@cebitec.uni-bielefeld.de>
>
>         * 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.
>

Reply via email to