[Bug c++/16139] Wrong warnings (unused variable) reported for the code provided when -Wall is used

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Tue Jun 22 17:24:00 GMT 2004


------- Additional Comments From bangerth at dealii dot org  2004-06-22 17:24 -------
Well, I wouldn't call it "invalid", just "infeasible". Note that all the 
variables you don't get warnings about have non-trivial constructors that 
have side effects. Sometimes, as in some patterns, a con/destructor call is 
the only interesting effect of a class, the variable is actually not 
used otherwise. To prevent warnings in these cases, the compiler can't] 
warn you in the cases you show. 
 
W. 

-- 


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



More information about the Gcc-bugs mailing list