Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!asuvax!mcdphx!udc!qbarnes From: qbarnes@urbana.mcd.mot.com (Quentin Barnes) Newsgroups: comp.lang.c++ Subject: Unwelcomed Standard Conversion Message-ID: <1991Apr12.153946.21003@urbana.mcd.mot.com> Date: 12 Apr 91 15:39:46 GMT Sender: news@urbana.mcd.mot.com (news) Organization: Motorola Computer Group, Urbana Design Center Lines: 24 Nntp-Posting-Host: neptune.urbana.mcd.mot.com I am new to C++ and am puzzled by a standard conversion. In Lippman on p. 160 discussing function matching by standard conversion said that any numeric type would match any numeric type. I thought this to be a bad idea and wrote this to test it: ++ #include void ff( short v ) { cout << "In short ff " << v << "\n"; } main() { int i = 70000; ff( i ); } ++ This compiled without warnings with both G++ and cfront 2.0 and silently truncates the integer. I could not find anything in Ellis about this. It is certainly not "value-preserving". Bug or feature? -- Quentin Barnes qbarnes@urbana.mcd.mot.com | ..!uiucuxc!udc!qbarnes