This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gcc-in-cxx] Don't initialize variable to itself
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 04 Mar 2009 08:31:37 -0800
- Subject: [gcc-in-cxx] Don't initialize variable to itself
I committed this patch to the gcc-in-cxx branch to avoid initializing a
variable to itself. This avoids a warning from the C++ frontend.
Ian
2009-03-04 Ian Lance Taylor <iant@google.com>
* vec.c (vec_gc_o_reserve_1): Don't initialize alloc to itself.
Index: vec.c
===================================================================
--- vec.c (revision 144568)
+++ vec.c (working copy)
@@ -226,7 +226,7 @@ vec_gc_o_reserve_1 (void *vec, int reser
bool exact MEM_STAT_DECL)
{
struct vec_prefix *pfx = (struct vec_prefix *) vec;
- unsigned alloc = alloc = calculate_allocation (pfx, reserve, exact);
+ unsigned alloc = calculate_allocation (pfx, reserve, exact);
if (!alloc)
{