cast to an enum does not throw errors even for invalid values

Gabriel Dos Reis gdr@cs.tamu.edu
Tue May 29 11:05:00 GMT 2007


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



More information about the Gcc-help mailing list