[PATCH] Fixing warnings revealed by gcc release build

Dmitri Gribenko gribozavr at gmail.com
Tue Jan 29 08:38:45 PST 2013


  > What do you mean by "when -Wno-maybe-uninitialized is available"? Do you mean to test gcc's version?

  Unfortunately, yes (because apparently gcc 4.3 does weird things).  r172543 r172006 do this for configure builds.

  > Also, as for (void), I used them only in situations where I couldn't move the store into the assert() or DEBUG() code that was using the variable.

  I see.  The (void) changes look good, modulo the comment below.


================
Comment at: lib/CodeGen/StackColoring.cpp:207
@@ -206,3 +206,3 @@
     DEBUG(dbgs()<<"Inspecting block #"<<Num<<" ["<<FI->getName()<<"]\n");
     Num = 0;
     DEBUG(dbgs()<<"BEGIN  : {");
----------------
This Num=0 store is never read.  It is better to remove Num altogether and inline the computation into DEBUG().


http://llvm-reviews.chandlerc.com/D341



More information about the llvm-commits mailing list