This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug middle-end/37448] patch to compute alloc-pool stats correctly
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Daniel Berlin <dberlin at dberlin dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <iant at google dot com>, "Hubicha, Jan" <jh at suse dot cz>
- Date: Wed, 08 Oct 2008 08:01:15 -0400
- Subject: Re: [Bug middle-end/37448] patch to compute alloc-pool stats correctly
- References: <OFD7CE77D9.48315B18-ONC12574DC.002BCD5F-C12574DC.002BE9CB@onevision.de>
Kai Tietz wrote:
> gcc-patches-owner@gcc.gnu.org wrote on 08.10.2008 09:33:44:
>
>
>> On Tue, Oct 7, 2008 at 6:52 PM, Ian Lance Taylor <iant@google.com>
>>
> wrote:
>
>>> Kenneth Zadeck <zadeck@naturalbridge.com> writes:
>>>
>>>
>>>>> I wonder if some of the types in alloc_pool_descriptor should be
>>>>> size_t rather than int, though it's hard to imagine it making a
>>>>> difference in real life.
>>>>>
>>>>>
>>>>>
>>>> I noticed this too, it actually does make a difference in the
>>>>
> printing
>
>>>> of the values on the testcase since they overflow. However, I did
>>>>
> not
>
>>>> know how to modify the formats in the printfs to print the size_ts.
>>>>
>>> The simple way is to use "unsigned long" and "%lu".
>>>
>> Which probably doesn't work for win64 ... of course there
>> isn't a portable one for size_t or long long.
>>
>> Richard.
>>
>>
>>> Ian
>>>
>>>
>
> Well, for size_t scalars a pointer dump could be used via %p, isn't it?
>
>
I just did the patch according to iant's preapprovial guidelines. If
anyone wants to change it, I have no real investment in the code.
However, what is there now is a distinct upgrade compared to what was
there before.
Kenny
> Kai
>
> | (\_/) This is Bunny. Copy and paste Bunny
> | (='.'=) into your signature to help him gain
> | (")_(") world domination.
>
>