This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ubsan] Add libcall arguments
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Jul 2013 21:01:25 +0200
- Subject: Re: [ubsan] Add libcall arguments
- References: <20130705140431 dot GB21800 at redhat dot com> <51E84650 dot 5020708 at redhat dot com> <20130719184530 dot GE3169 at redhat dot com> <20130719185042 dot GY23578 at laptop dot redhat dot com>
On Fri, Jul 19, 2013 at 08:50:42PM +0200, Jakub Jelinek wrote:
> On Fri, Jul 19, 2013 at 08:45:30PM +0200, Marek Polacek wrote:
> > > >+uptr_type (void)
> > > >+{
> > > >+ return build_nonstandard_integer_type (POINTER_SIZE, 1);
> > >
> > > Why not use uintptr_type_node?
> >
> > I suppose I could. I just followed suit what asan.c does. I didn't
> > address this in this patch, but I can, if you want to.
>
> uintptr_type_node is a C/C++/ObjC/ObjC++ FE tree. So, if you use it just
> in c-family/c-ubsan.c, that is just fine, but you can't use it in ubsan.c.
In that case I prefer to keep uptr_type around. Even though I like
uintptr_type_node more.
> > @@ -67,8 +68,8 @@ inline bool
> > ubsan_typedesc_hasher::equal (const ubsan_typedesc *d1,
> > const ubsan_typedesc *d2)
> > {
> > - /* ??? Here, the types should have identical __typekind,
> > - _typeinfo and __typename. Is this enough? */
> > + /* Here, the types should have identical __typekind,
> > + _typeinfo and __typename. */
> > return d1->type == d2->type;
> > }
>
> Only one underscore for _typeinfo ?
I wonder where the _ disappeared. Will fix.
Marek