This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR ada/35998
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Wed, 13 Nov 2013 10:34:30 +0100
- Subject: Re: [patch] Fix PR ada/35998
- Authentication-results: sourceware.org; auth=none
- References: <1953979 dot BppAL6HeZv at polaris> <CAFiYyc08GFv18Hp1XTD+x_N6aJVBPypr4TneYdDY5ubT2u70rQ at mail dot gmail dot com> <2198096 dot Vj9GxGMGzo at polaris>
On Mon, Nov 11, 2013 at 6:06 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> Due to the different interfaces of int_size_in_bytes and
>> simple_type_size_in_bits (and 'size' in add_byte_size_attribute being
>> unsigned and not [unsigned] HWI) it would be cleaner to
>> add an early return after the call to int_size_in_bytes if its
>> return value is -1 (and make sure the return value doesn't
>> overflow an unsigned int - likewise for simple_type_size_in_bits,
>> not sure why that case doesn't use int_size_in_bytes as well ...)?
>
> Both calls are present in the first version of the function, but I agree that
> the discrepancy looks strange.
>
> Revised version attached, tested {GCC,GDB} on x86_64-suse-linux.
Ok.
Thanks,
Richard.
> 2013-11-11 Eric Botcazou <ebotcazou@adacore.com>
>
> PR ada/35998
> * dwarf2out.c (add_byte_size_attribute): Use int_size_in_bytes also
> for fields. Do not add the attribute if the size is negative.
>
>
> --
> Eric Botcazou