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

  1. Q64440 Internal Compiler Error: '@(#)newcode.c:1.87', Line 604
  2. Microsoft C Compiler (C)
  3. 6.00   | 6.00
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.  
  8. If the sample code below is compiled in large or compact memory model
  9. with any optimizations except /Od, /Oa, or /Ow, the compiler will fail
  10. with the following error message:
  11.  
  12.    fatal error C1001: Internal Compiler Error
  13.     (compiler file '@(#)newcode.c:1.87', line 604)
  14.     Contact Microsoft Product Support Services
  15.  
  16. If compiled with /Oa or /Ow, the following error message will be
  17. generated:
  18.  
  19.    fatal error C1001: Internal Compiler Error
  20.     (compiler file '@(#)regMD.c:1.100', line 1017)
  21.     Contact Microsoft Product Support Services
  22.  
  23. Sample Code
  24. -----------
  25.  
  26. #include <ctype.h>
  27. #define OFFSET 2
  28. #define NEXTFP(nextfp,fp) \
  29.         nextfp = (long) fp & 0xffff0000;\
  30.         nextfp = nextfp + * fp + *(fp+1) * 0x100;
  31.  
  32. static unsigned char * stk_bottom;
  33. static long first_fp;
  34.  
  35. void main (void) {}
  36.  
  37. void chkstkinit()
  38. {
  39.    unsigned char stk_top;
  40.    static long nextfp;
  41.    static unsigned char *fp;
  42.  
  43.    stk_top = 0xaa;
  44.    fp = &stk_top + OFFSET;
  45.    NEXTFP(nextfp, fp);
  46.    stk_bottom = (unsigned char *)nextfp;   // Error on this line
  47.    first_fp = *stk_bottom + *(stk_bottom +1) * 0x100;
  48.  
  49.    return;
  50. }
  51.  
  52. More Information:
  53.  
  54. Since these errors occur if any optimization is turned on, compiling
  55. with the /Od optimization switch or using the new optimize pragma to
  56. turn off all optimizations is the easiest solution.
  57.  
  58. Keywords:  buglist6.00
  59.  
  60. COPYRIGHT Microsoft Corporation, 1990.
  61. Updated  90/09/01 08:26
  62.