ID Number: Q62183
6.00 6.00a | 6.00 6.00a
MS-DOS | OS/2
buglist6.00 buglist6.00a fixlist7.00
Summary:
SYMPTOMS
Any of the coprocessor instructions (such as fidiv, fiadd, fisub,
fimul, and ficom) used in an inline assembly block may result in an
incorrect C2404 error in QuickC versions 2.5 and 2.51 or when using
the quick compile (/qc) option with Microsoft C versions 6.0, 6.0a,
and 6.0ax.
The sample code below demonstrates this problem. When compiled, the
following error is generated:
error C2404: 'ST' : illegal register in 'operand 3'
RESOLUTION
The only workaround in C versions 6.0, 6.0a, and 6.0ax is to not use
the /qc option. There is no known workaround for QuickC.
STATUS
Microsoft has confirmed this to be a problem with C versions 6.0,
6.0a, and 6.0ax and QuickC versions 2.5 and 2.51 (buglist2.50 and
buglist2.51). This problem was corrected in C/C++ version 7.0.
More Information:
Sample Code
-----------
/* Compile options needed: /qc (none with QuickC)
*/
void main (void)
{
int i = 3 ;
_asm fidiv i
}