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: [C++ PATCH] Battle of the comptypes (PR c++/35049)



I'd prefer a more precise name such as types_compatible_p, rather than an
abbreviated "comp" ("compatible"? "compare"?).

Fine; the disadvantage is that a lot of lines would wrap.


C++'s comptypes (with its "strict" argument equal to 0) is a
comparison to determine whether two types are exactly the same, so
int[] and int[5] would be different.  Of course, that's C++'s notion of
compatibility; C++ handles assignment from one type to another by
introducing implicit conversions to make the types the same.

So, comptypes is still the right name, I think, although "comp" is
rather ambiguous: is it "compare" or "compatible"?

So we would have to add a ", 0" to every comptypes call in the C front-end.


Paolo


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