Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: `C' type question... Message-ID: <309@taumet.com> Date: 10 Jul 90 16:30:20 GMT References: <26854@netnews.upenn.edu> Distribution: usa Organization: Taumetric Corporation, San Diego Lines: 17 weisen@eniac.seas.upenn.edu (Neil Weisenfeld) writes: >Maybe I should read K&R a little more thoroughly before posting this, but... Yes. >Why does the following segment of code give a conversion between >integral types warning under MSC6.00? >#define ACTUAL_SPACE ' ' > *mem++=(*str)?(*str++):ACTUAL_SPACE; The type of a character constant (' ' in your example) is int, not char. Hence the left side of the colon is type char and the right side is int. The compiler is correct in issuing the warning. -- Steve Clamage, TauMetric Corp, steve@taumet.com