This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: cast to an enum does not throw errors even for invalid values
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: John Love-Jensen <eljay at adobe dot com>
- Cc: Shriramana Sharma <samjnaa at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: 28 May 2007 19:24:45 -0500
- Subject: Re: cast to an enum does not throw errors even for invalid values
- References: <C280D256.2233A%eljay@adobe.com>
John Love-Jensen <eljay@adobe.com> writes:
[...]
| > I feel GCC can implement the same for enum-s too.
|
| GCC cannot implement the same for enum's too, because then the resulting
| language would be not-C++, which is not in the best interest of GNU and GCC.
[...]
| But if you want to pursue introducing a feature request to C++, please
| contact ISO/IEC JTC1/SC22/WG21 The C++ Standards Committee:
|
| http://www.open-std.org/jtc1/sc22/wg21/
It's worth pointing out that enums will be "improved" in C++0x:
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2213.pdf
That is now part of the draft standard. I believe Shriramana's issue
is addressed.
-- Gaby