This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ubsan] Introduce pointer_sized_int_node
- From: Marek Polacek <polacek at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Aug 2013 14:56:16 +0200
- Subject: Re: [ubsan] Introduce pointer_sized_int_node
- Authentication-results: sourceware.org; auth=none
- References: <20130826101509 dot GH4968 at redhat dot com> <CAFiYyc2O5N91=kDF-aJOTUz67_m7RpF9b7m6zi9apw0bZECkrA at mail dot gmail dot com>
On Tue, Aug 27, 2013 at 01:48:29PM +0200, Richard Biener wrote:
> > + TI_POINTER_SIZED_TYPE,
>
> I'd rather see TI_UINTPTR_TYPE and TI_INTPTR_TYPE (note they might
> not be exactly of POINTER_SIZE but larger).
We already have [u]intptr_type_node -- but only in c-family/, thus
ubsan.c/asan.c cannot use those nodes. I can create both
TI_SIGNED_POINTER_SIZED_TYPE and TI_UNSIGNED_POINTER_SIZED_TYPE,
but we currently need only the latter...
> TI_POINTER_SIZED_TYPE is ambiguous, too - what's its signedness?
Unsigned. But yeah, one can't tell by just looking at the name.
> All around the compiler we use sizetype and ssizetype to munge pointers
> (well, not strictly correct as targets may define sizetype to be larger/smaller
> than actual pointers).
I see.
Marek