🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Eberhard Mattes Tue, 25 Aug 1992 20:49
Abnormal program termination (packed bit field)
#991
Author: Eberhard Mattes
Date: Tue, 25 Aug 1992 20:49
22 lines
993 bytes
This happened with GCC 2.2.2 for 80386, with #pragma pack of i386v4.h.

gcc -c bug.c
Abnormal program termination
core dumped

------------------------------- cut here -------------------------------------
#pragma pack(1)

struct
{
  unsigned short field1 : 5;
  unsigned short field2 : 6;
} var1;

void fun1 (void)
{
  var1.field2 = 1;
}
------------------------------- cut here -------------------------------------

Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de)
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