🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Michael Shapiro Mon, 14 Sep 1992 16:52
shift count warning
#1138
Author: Michael Shapiro
Date: Mon, 14 Sep 1992 16:52
22 lines
929 bytes
The following short program gives a warning message I think it shouldn't.
I wanted to pass this by you to see why it is giving me the warning. The
compiled code does what it is supposed to do:

    main()
    {
	unsigned char b;
	int x,y;

	x = 511;
	y = 1;

	b = (unsigned char )(x - (y<<8));
	printf ("%d\n", (int)b);
    }

# gcc main.c
main.c: In function `main':
main.c:9: warning: shift count exceeds width of value shifted

# a.out
255
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