Q46129: Problem with QuickC Inline Assembler INT Call and Typedefs
Article: Q46129
Product(s): See article
Version(s): 2.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | S_QuickASM buglist2.00 | mspl13_c
Last Modified: 27-JUN-1989
When compiled with QuickC Version 2.00, the code below compiles and
gives the following message for the line containing the initialization
of bar:
error C2064 : term does not evaluate to function
Removing the parentheses from the 0 in the initialization causes the
following message:
error C2143 : missing ')' before 'constant'
Inline assembler code must contain an interrupt call (INT) for this
error to occur. Using a simple type cast before the typedef'ed type
cast solves the problem. In the following example, reverse the order
of the initializations for bar and fad to put the simple typecast
first.
Code Example
------------
typedef unsigned short far *FOO;
FOO bar;
float fad;
void main( void )
{
_asm { int 11h }
bar = ((FOO) (0)); /* reversing this line with the next */
fad = (float)3.4; /* prevents the problem */
}
Microsoft has confirmed this to be a problem in QuickC Version 2.00.
We are researching this problem and will post new information as it
becomes available.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.