Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwvax!brownie.cs.wisc.edu!so From: so@brownie.cs.wisc.edu (Bryan S. So) Newsgroups: comp.os.msdos.programmer Subject: Turbo C++ bit field bug Message-ID: <1990Dec16.005724.8602@spool.cs.wisc.edu> Date: 16 Dec 90 00:57:24 GMT Sender: news@spool.cs.wisc.edu (The News) Organization: U of Wisconsin CS Dept Lines: 33 Originator: so@brownie.cs.wisc.edu Does anybody from Borland read this newsgroup? The following C program hangs up if compiled with -ml under Turbo C++ (both 1.0 & 1.01). No problem uner Small model. No problem with MS C either. Probably a problem with the bit field "calculated". Can somebody suggest a work around? #define MAX_UNITS 20 typedef struct { double a; double b; unsigned calculated: 1; } unit; typedef struct { double w[MAX_UNITS][MAX_UNITS]; unit u[MAX_UNITS]; } nn; main() { nn Net; Net.u[7].a = 0.70; printf("%.2lf\n", (Net.u)[7].a); return 0; } Bryan So