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

  1. Q64564 Internal Compiler Error: '@(#)regMD.c:1.100' Line 929
  2. Microsoft C Compiler (C)
  3. 6.00   | 6.00
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.  
  8. The code below, when compiled using Microsoft C 6.00, produces the
  9. following error:
  10.  
  11.    foo.c(15) : fatal error C1001: Internal Compiler Error
  12.                (compiler file '@(#)regMD.c:1.100', line 929)
  13.                Contact Microsoft Product Support Services
  14.  
  15. Sample Code
  16. -----------
  17.  
  18. // Compile using 'cl -Od':
  19.  
  20. #define Rev(x)  ( ( (x) >> 24 ) | \
  21.                   ( ( (x) & 0xff0000 ) >> 8 ) | \
  22.                   ( ( (x) & 0x00ff00 ) << 8 ) | \
  23.                   ( (x) << 24) )
  24.  
  25. #define Get(x,y) \
  26.     (((x) == 183) ? (y) : Rev(y))
  27.  
  28. void main (void)
  29. {
  30.    long l;
  31.    long *pl;
  32.    int Order;
  33.  
  34.    l = Get(Order,*pl);  // This line causes the error.
  35. }
  36.  
  37. More Information:
  38.  
  39. The workaround for this problem is to either compile using the "-qc"
  40. option or to simplify the expression.
  41.  
  42. One way of simplifying the above nested macro expression is to call
  43. each macro separately. For instance, the following is a feasible
  44. workaround:
  45.  
  46. 1. Redefine the Get macro as follows:
  47.  
  48.       #define Get(x,y,z) \
  49.           ((((x) == 183) ? (y) : (z))
  50.  
  51. 2. Then for every call to the Get macro, use the following two
  52.    statements:
  53.  
  54.       temp = Rev(x);
  55.       l = Get(Order,*pl,temp);
  56.  
  57. Microsoft has confirmed this to be a problem with the C Compiler
  58. version 6.00. We are researching this problem and will post new
  59. information here as it becomes available.
  60.  
  61. Keywords:  buglist6.00
  62.  
  63. COPYRIGHT Microsoft Corporation, 1990.
  64. Updated  90/09/01 08:26
  65.