Path: utzoo!attcan!uunet!jarthur!dfoster From: dfoster@jarthur.Claremont.EDU (Derek R. Foster) Newsgroups: comp.os.msdos.programmer Subject: Re: TC++ 1.0 Loses Type Information? (In English) Message-ID: <8920@jarthur.Claremont.EDU> Date: 7 Oct 90 02:55:51 GMT References: <2019@cpgvgw.vid.cpg.sony.co.jp> <640@demott.COM> Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 24 In article <640@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: >In article <2019@cpgvgw.vid.cpg.sony.co.jp> kutner@vid.cpg.sony.co.jp (Mike Kutner) writes: >>The following code fragment gives a "Suspicious pointer conversion" >>warning message when compiled by Turbo C++ 1.0 (in C mode). It seems >>that the structure member's type information is getting lost. An >>explicit cast (enum day_t *) gets rid of the warning message. However, >>am I being dense or has someone else seen this problem? I've seen this problem. And, to answer a couple of previous poster's suggestions, the problem is not merely dependant on whether the enum in question is a member of a struct/class or not. I've had this problem with global variables too. I think it's a bug in TC++. MSC v. 5.1 passed my code without complaint, but TC++ complains. Also: in reply to another poster's response that the difference is caused by the way C++ treats enums: I don't see any reason why the difference between enum and int which is enforced by C++ (but not C) should make any difference in whether a pointer to an enum type should be able to be passed via a function call to a pointer of the same type. I could see problems created if one or the other was a normal int perhaps, but that was not the case here. Perhaps I am misunderstanding you? Derek Riippa Foster