This is the mail archive of the 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] Re: fold_builtin_memcpy cannot optimize <retval>?(take 2)

On Fri, 2005-01-21 at 16:51 -0500, Jakub Jelinek wrote:
> On Fri, Jan 21, 2005 at 10:03:53AM -0800, 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. 
> > 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.
> Is this ok to commit then assuming bootstrap/regtest are ok?
> Certainly cures the testcase.
> 2005-01-21  Jakub Jelinek  <>
> 	* builtins.c (get_pointer_alignment, gimplify_va_arg_expr,
> 	expand_builtin_printf, expand_builtin_fprintf,
> 	expand_builtin_sprintf): Use POINTER_TYPE_P instead TREE_CODE
> 	checking against POINTER_TYPE.
> 	(validate_arglist): Handle POINTER_TYPE code by checking
> 	* g++.dg/tree-ssa/empty-1.C: New test.
Yea, I think this is OK once the bootstrap and regression testing are


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