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: [PATCH] Fix C++/14329, badly formatted warnings for SRA replacements used uninitialized


Andrew Pinski wrote:
> Hi,
>   RTH's C++ patch in
> http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01988.html was almost
> correct.  There were two problems with it.  First the use of the
> variable name "t" was causing regressions as the variable shadowing
> another variable named "t" which was used to set the locus later on.

I don't understand that.  RTH's patch used a local variable "t", and all
references to "t" in his patch look correct.  Since t goes out of scope
at the end of the "}", why is using "t" wrong?

> Second, we needed to change the order of DECL_DEBUG_EXPR and
> DECL_DEBUG_EXPR_IS_FROM and then add a check for DECL_P.  With those
> minor changes, we get the correct result and no regressions.

Your patch is OK.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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