Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Paul English
Fri, 07 Oct 1988 19:39
gcc 1.28 bug -- short to long
Author: Paul English
Date: Fri, 07 Oct 1988 19:39
Date: Fri, 07 Oct 1988 19:39
18 lines
741 bytes
741 bytes
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 <stdio.h>
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 */
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads