This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix overflows in -ftime-report
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 Aug 2013 17:15:10 +0200
- Subject: Re: Fix overflows in -ftime-report
- References: <20130822150318 dot GB11005 at kam dot mff dot cuni dot cz> <52162950 dot 8060605 at arm dot com>
> > if (phase_wall > total->wall)
> > fprintf (fp, "wall %24.18e > %24.18e\n", phase_wall, total->wall);
> > if (phase_ggc_mem > total->ggc_mem)
> > - fprintf (fp, "ggc_mem %24u > %24u\n", phase_ggc_mem, total->ggc_mem);
> > + fprintf (fp, "ggc_mem %24lu > %24lu\n", phase_ggc_mem, total->ggc_mem);
> > gcc_unreachable ();
> >
>
> Won't that cause compilation errors on platforms where size_t is not
> unsigned long?
You are probably right. I will add the cast shortly.
Thanks,
Honza
>
> R.