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++/16517] warn about variables that are only ever assigned to, but never read


------- Additional Comments From tneumann at pi3 dot informatik dot uni-mannheim dot de  2004-07-13 14:52 -------
(In reply to comment #2)
> I would disagree because people do this to make the warning go away.

The warning about unused variables? I would rather recommend to simple remove 
the variable or if that is not possible to use __attribute__(unused).

But this is secondary, I don't really think your argument is valid. First of all 
the warning could be disabled and second other compilers (like the Borland and 
the Intel compiler) also warn about variables that are set but never read, so it 
should not break too much existing code. 
If you are really nervous about breaking existing code leave it disabled even at 
-Wall -Wextra, although I don't see a reason for this.


-- 


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


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