This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Battle of the comptypes (PR c++/35049)
On Fri, 8 Feb 2008, Paolo Bonzini wrote:
> Joseph S. Myers wrote:
> > On Thu, 7 Feb 2008, Paolo Bonzini wrote:
> >
> > > 1) bulk-rename the calls to comptypes in the C front-end to same_type_p
> >
> > That name would be misleading. The test is for compatibility, not sameness;
> > int[] and int[5] are compatible, not the same.
>
> Is the same true for C++? If we settle on a name like comp_type_p, we should
> change it for both C and C++. I can commit a patch that chooses a different
> name, but the one I posted would anyway be much smaller and easier to review;
> so I'd prefer to have the renaming of same_type_p preapproved on top of the
> patch I already posted.
I can't speak for the semantics of functions in the C++ front end (or how
many different but related concepts there may be in the C++ language).
I'd prefer a more precise name such as types_compatible_p, rather than an
abbreviated "comp" ("compatible"? "compare"?).
--
Joseph S. Myers
joseph@codesourcery.com