This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] types_compatible_p mess 2/3 (C++)
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Jason Merrill <jason at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 06 Mar 2008 17:25:42 +0100
- Subject: Re: [PATCH] types_compatible_p mess 2/3 (C++)
- References: <47CFF346.email@example.com> <47D004B0.firstname.lastname@example.org>
It seems to me that lang_hooks.types_compatible_p should never be called
with reference types.
Which sense of "should" do you mean here? That doing so would be
inappropriate, or that it just doesn't ever happen?
That it doesn't ever happen, and that anyway handling it this way would
It doesn't ever happen because the langhook is only called by c-common.c
for vector types, by c-format.c after REFERENCE_TYPE have already been
dereferenced or converted to POINTER_TYPEs, by the middle-end for
It would be inappropriate because when comptypes recurses (e.g. through
compparms) the special code in cxx_types_compatible_p is not invoked.