fold_builtin_memcpy cannot optimize <retval>?

Mark Mitchell mark@codesourcery.com
Fri Jan 21 20:30:00 GMT 2005


Paul Brook wrote:
> On Friday 21 January 2005 18:03, Mark Mitchell wrote:
> 
>>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.
> 
> 
> Didn't we discuss this before and decide that REFERENCE_TYPE objects can be 
> NULL?
> http://gcc.gnu.org/ml/gcc-patches/2004-08/msg01463.html

I'm not sure.  I seemed to believe in that thread that they could never 
be NULL, but I'm not sure if everyone agreed, and I see that we 
suggested a non-NULL tag on objects somewhere.  So, in that case, there 
may be no difference at all to the middle-end.  In any case, I think 
that it would make sense for us to allow a REFERENCE_TYPE anywhere we 
allow a POINTER_TYPE.

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



More information about the Gcc mailing list