------- Comment #3 from andi-gcc at firstfloor dot org 2010-06-09 10:13 ------- Sorry my example was not very good.
Anyways this typically happens with #ifdefs, so the some ifdef path is actually using the variable, it's just not enabled in the current build. In theory the ifdefs could be put around the variables too, but it would increase the ifdef frequency a lot. Another case i've also seen is to use it as a dummy output variable of inline assembler, where the assembler is in a macro and it's sometimes used and sometimes not. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44478