------- Comment #2 from sigra at home dot se 2006-01-18 16:07 ------- Example 1: { int i = f(); do_something(i + 1, 7, 'h'); do_something_else(i % 3, 'e'); }
If i could be declared "const int", the compiler should warn. Example 2: float dra(float m, Panel & p) { p.do_me(5); return p.set_moad(m); } If m could be declared "const float", the compiler should warn. Example 3: { char t = 2; if (hej.is_double()) t *= 7; std::cout << static_cast<unsigned short>(t) << std::endl; } If "static_cast<const unsigned short>" would work, the compiler should warn. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25845