Thread View: mod.computers.masscomp
1 messages
1 total messages
Started by dhb
Mon, 18 Aug 1986 04:02
Bug using sizeof in cc (SP-2850) 1.1
Author: dhb
Date: Mon, 18 Aug 1986 04:02
Date: Mon, 18 Aug 1986 04:02
24 lines
1061 bytes
1061 bytes
I ran across a bug using sizeof with an expression when the expression
is a typedefed variable of an array type. The following program illustrates
the problem:
typedef int BITMAP[4];
main ()
{
BITMAP map;
printf("sizeof (BITMAP) = %d\n", sizeof (BITMAP));
printf("sizeof (map) = %d\n", sizeof (map));
}
results in the output
sizeof (BITMAP) = 16
sizeof (map) = 4
I have sent in an SQR on the problem.
Dave Bilitch { topaz | seismo }!cit-vax!bek-mc!dhb
CALTECH
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