vanaards%t7@uk.ac.man.cs (vanaards) (02/22/91)
I'm at the finishing stages of my finals project, and have come-across a little problem, there doesn't appear to be anything wrong with the code which uses this structure but by removing the 'padding' (int :32) the program will cause the machine to hangup. The hangup occurs within a particular function, but is irregular, even when tested under the same test conditions, it hangs up at different points! Here's the structure : ------------------------------------------------------------------------ typedef struct history_structure *HIST_PTR; typedef struct history_structure { long int vfrom; char *filename; long int from,to; long int lastpos; HIST_PTR next; int :32; /* Compiler bug ? */ HIST_PTR previous; } HIST_REC; ------------------------------------------------------------------------ Any ideas ? +--------------------------------+-----------------------------------------+ | ()()TEVEN () | | | () ()() | | | ()() () ()AN () () | | | () ()() ()()()() +-----------------------------------------+ | ()() () () ()ARDT |JANET E-mail : vanaards@uk.ac.man.cs.p4 | +--------------------------------+-----------------------------------------+
wainhous@kcl-cs.UUCP (Andy) (02/26/91)
In article <1991Feb22.123151.11136@cns.umist.ac.uk> vanaards%t7@uk.ac.man.cs (vanaards) writes: > > > I'm at the finishing stages of my finals project, and have come-across >a little problem, there doesn't appear to be anything wrong with the code >which uses this structure but by removing the 'padding' (int :32) the >program will cause the machine to hangup. The hangup occurs within a > >Any ideas ? > No idea what causes it but I have discovered that with my (old) version of the Norcroft C compiler, if you try to use some enumerated types within a structure the compiler breaks and at some random time afterwards, the entire machine crashes!! Andy.