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++)


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 be inappropriate.


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 aggregate types.

It would be inappropriate because when comptypes recurses (e.g. through compparms) the special code in cxx_types_compatible_p is not invoked.

Paolo


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