home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / C6_BUGS.ZIP / C6_20104.BUG < prev   
Text File  |  1990-09-11  |  2KB  |  55 lines

  1. Q65300 C1001: Internal Compiler Error: '@(#)regMD.c:1.100', Line 3431
  2. Microsoft C Compiler (C)
  3. 6.00   | 6.00
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.  
  8. When compiled with the /Ox option, the code below generates the
  9. following internal compiler error:
  10.  
  11.    fatal error C1001: Internal Compiler Error
  12.    (compiler file) '@(#)regMD.c:1.100', line 3431
  13.    Contact Microsoft Product Support Services
  14.  
  15. Sample Code
  16. -----------
  17.  
  18. typedef struct {
  19.    char DispCon:1;
  20.    char DispMon:1;
  21.    char Flash:1;
  22.    char Tones:1;
  23.    char TonInt:1;
  24. } tTVsetup;
  25.  
  26. void CopyTVsetup(tTVsetup dest[], tTVsetup src[])
  27. {
  28.    int calltype;
  29.  
  30.    for (calltype = 0; calltype < 5; calltype ++)
  31.    {
  32.       dest[calltype].TonInt = src[calltype].TonInt;
  33.       dest[calltype].DispCon = src[calltype].DispCon;
  34.       dest[calltype].DispMon = src[calltype].DispMon;
  35.       dest[calltype].Flash = src[calltype].Flash;
  36.       dest[calltype].Tones = src[calltype].Tones;
  37.    }
  38. }
  39.  
  40. Note that a signed bit-field makes no sense, and when changed to
  41. unsigned, this code compiles correctly. The "e" optimization seems to
  42. be causing this error. Not using it on the command line or adding an
  43. optimize pragma to turn off the function will work as a workaround.
  44.  
  45. More Information:
  46.  
  47. Microsoft has confirmed this this to be a problem with C version 6.00.
  48. We are researching this problem and will post new information here as
  49. it becomes available.
  50.  
  51. Keywords:  buglist6.00
  52.  
  53. COPYRIGHT Microsoft Corporation, 1990.
  54. Updated  90/09/08 05:16
  55.