This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] types_compatible_p mess 2/3 (C++)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Paolo Bonzini" <bonzini at gnu dot org>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Jason Merrill" <jason at redhat dot com>
- Date: Thu, 6 Mar 2008 14:41:10 +0100
- Subject: Re: [PATCH] types_compatible_p mess 2/3 (C++)
- References: <47CFF346.9090101@gnu.org>
On Thu, Mar 6, 2008 at 2:36 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
> It seems to me that lang_hooks.types_compatible_p should never be called
> with reference types. I tested this with the testcase
>
> extern int printf (const char *, ...);
> int f(int &x)
> {
> printf ("%p", &x);
> }
>
> Ok?
If this part is only for calls from the middle-end then the patch makes
sense. Otherwise I have no opinion on it, but maybe you can add
an assert and a comment?
Richard.