From Sean Palmer · 1996-04-09 19:38 · #73668 in EMULATE
WK>MSGID: 1:151/117 3166716c SP>Borland 5 has a bug with Anonymous structs-- putting an anonymous st SP>inside a union causes the struct to be erroneously treated as a unio SP>well. Even without being in a union, bit-fields inside an anonymous WK>struct are not honored. WK>MS-C/C++ 7.0 also has its bugs. It will often not compile inline WK>functions correctly. Perhaps most people don't encounter this WK>problem, because the default compiler options compile all functions WK>out-of-line, even those explicitly declared to be inline. Who makes these defaults anyway? Maybe for a debugging setup... WK>MS-C 6.0 seems to also have problems with bit fields. The only WK>work around I could find was to disable optimization. Also, an WK>if statement as the only statement in a for/while loop will not WK>always compile properly. (The work-around is to use a redundant WK>pair of braces around the if statement.) ... WK>I've never used a compiler that didn't have it's bugs. That's unfortunately probably always going to be true. Still I'd like the bugs to be fixed for the next release, whenever possible... If not, work-arounds are acceptable if anyone knows of any. In this case the workaround would be to just not use anonymous structs, right? Watcom 10.5 seems to have its bugs too. There is at least one similar problem with inlining that I haven't tracked down yet. --- * WR 1.32 # 380 * Man's best possession is a sympathetic wife. * Origin: deltaComm Online (919) 481-9399 (1:151/107)