This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] types_compatible_p mess 2/3 (C++)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]