Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!ucbvax!agate!apple!well!nagle
From: nagle@well.UUCP (John Nagle)
Newsgroups: comp.lang.c++
Subject: Re: assigning int to enum
Message-ID: <13131@well.UUCP>
Date: 14 Aug 89 16:31:52 GMT
References: <387@odi.ODI.COM> <9550@alice.UUCP> <389@odi.ODI.COM>
Reply-To: nagle@well.UUCP (John Nagle)
Lines: 14

In article <389@odi.ODI.COM> benson@odi.com (Benson Margulies) writes:

- 2) You might be amused in how I got into this. For ease of debugging
- work I am doing to c++ itself, I defined the type TOK to be a real
- live enum of the token types. So my friendly debugger can print
- token names instead of numbers. Well, I got about 50 warnings
- about assignments of 0 or ints or chars to TOK's! So I was looking
- madly for a way to preserve the debugging enhancement and shut up the
- warnings other than to fix all of the offending uses of TOK in the entire
- cfront source.

     Adding a language feature to support bad code is generally not desirable.

						John Nagle