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

  1. Q65305 C1001: Internal Compiler Error: '@(#)regMD.c:1.100', Line 4634
  2. Microsoft C Compiler (C)
  3. 6.00   | 6.00
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.  
  8. The code below generates the following error if compiled with /Oe and
  9. /Ol in any memory model:
  10.  
  11.    fatal error C1001: Internal Compiler Error
  12.         (compiler file '@(#)regMD.c:1.100', line 4634)
  13.  
  14. Sample Code
  15. -----------
  16.  
  17. #include <stdio.h>
  18.  
  19. extern FILE *ftable;
  20. extern int nrules;
  21. extern short *rrhs;
  22.  
  23. output_rule_data()
  24. {
  25.   int i;
  26.   int j,k;
  27.  
  28.   for (i=1;i<nrules;i++)
  29.   {
  30.     k = i+1;     // Use k for i+1 in the next line as a workaround
  31.  
  32.     fprintf(ftable,"%6d",rrhs[i+1] - rrhs[i] - 1);
  33.   }
  34. }
  35.  
  36. The following are suggested workarounds:
  37.  
  38. 1. Do the incrementing of the index of the array outside the printf
  39.    using a temporary variable, and use that variable as the index
  40.    inside the printf.
  41.  
  42. 2. Compile without the /Oe or /Ol compile option by NOT including the
  43.    option on the compile line or using the optimize or loopopt pragma.
  44.  
  45. Microsoft has confirmed this to be a problem with C version 6.00. We
  46. are researching this problem and will post new information here as it
  47. becomes available.
  48.  
  49. Keywords:  buglist6.00
  50.  
  51. COPYRIGHT Microsoft Corporation, 1990.
  52. Updated  90/09/01 08:26
  53.