This is the mail archive of the gcc@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: fold_builtin_memcpy cannot optimize <retval>?


Jeffrey A Law wrote:

I'm not an expert on the differences in the semantics of POINTER_TYPE
and REFERENCE_TYPE, but I do know that I've been treating them as
effectively the same.

The only difference is that a REFERENCE_TYPE object can never be NULL. Other than that, they are identical. (In C++, you cannot assign to a reference, but that is expressed by TREE_READONLY on the object.)


I think that it makes sense to use POINTER_TYPE_P almost everywhere in the middle-end. The other choices is to introduce explicit NOP_EXPRs to do the conversions -- but that's just a waste of memory, in my opinion.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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