[Bug c++/25845] want optional warning for non-constant declarations that could be constant

Gabriel Dos Reis gdr@cs.tamu.edu
Wed Jan 18 20:30:00 GMT 2006


"sigra at home dot se" <gcc-bugzilla@gcc.gnu.org> writes:

|  std::cout << static_cast<unsigned short>(t) << std::endl;
| }
| 
| If "static_cast<const unsigned short>" would work, the compiler should warn.

given call-by-value, you must be joking.

-- Gaby



More information about the Gcc-bugs mailing list