Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!ra.umb.edu!pme From: pme@ra.umb.edu (Paul English) Newsgroups: gnu.gcc.bug Subject: gcc 1.28 bug -- short to long Message-ID: <8810071939.AA24542@ra.cs> Date: 7 Oct 88 19:39:25 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 18 Is this a bug? (The standard Sun C compiler sets `lo' to 65535.) /* short2long.c, pme@umb.umb.edu, 07oct88 */ /* Demonstrate gcc 1.28 bug. */ #include void main() { unsigned short sh; unsigned long lo; sh = ~0; /* all ones, or, 65535 */ lo = sh; /* 0, but why? */ printf( "sh = %d, lo = %d\n", sh, lo ); /* Output is 65535, 0 */ }