This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]