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: [improved-aliasing]: Reduce memory usage of memory tags/


On Mon, 2005-09-26 at 09:10 -0700, Richard Henderson wrote:
> On Mon, Sep 26, 2005 at 11:28:00AM -0400, Daniel Berlin wrote:
> > +  /* Make the type of the variable writable.  */
> > +  new_type = build_type_variant (type, 0, 0);
> > +  TYPE_ATTRIBUTES (new_type) = TYPE_ATTRIBUTES (type);
> > +
> > +  tmp_var = build_decl (code, create_tmp_var_name (prefix),
> > +			type);
> 
> new_type is unused.
> 

Why yes, yes it is
Hmmmmmm.

This is actually a bug in the original function too.  See
create_tmp_var_raw:



  /* Make the type of the variable writable.  */
  new_type = build_type_variant (type, 0, 0);
  TYPE_ATTRIBUTES (new_type) = TYPE_ATTRIBUTES (type);

  tmp_var = build_decl (VAR_DECL, prefix ? create_tmp_var_name
(prefix) : NULL,
                        type);


I wonder why nothing warns.

> 
> 
> r~


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