This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug c++/25845] want optional warning for non-constant declarations that could be constant
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: gcc-bugzilla at gcc dot gnu dot org
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2006 14:32:01 -0600
- Subject: Re: [Bug c++/25845] want optional warning for non-constant declarations that could be constant
- References: <bug-25845-315@http.gcc.gnu.org/bugzilla/> <20060118160742.32340.qmail@sourceware.org>
"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