http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56958



--- Comment #3 from lucdanton at free dot fr 2013-04-28 00:37:37 UTC ---

I do make use of the variable in the pack; that the pack may be empty for some

instantiations may or may not be something to look out for, but I don't think

that it should be done by the unused variable warning.



Perhaps I misunderstand the role of warning -- to me the 'used' in 'unused

variable' means that it's conceptually used, not that it's e.g. ODR-used or any

technical sense of the term. Should the following code warn? Who does that

benefit?



    int spurious = 0

    if(1) return 0;

    // never reached -- is spurious used or not?

    return spurious + 3;



Since GCC doesn't warn for this I thought it shouldn't in the case of the pack

expansion.

Reply via email to