Microsoft KB Archive/42563

QuickC issues extra warning messages C4024 and C4028 PSS ID Number: Q42563 Article last modified on 05-02-1989 PSS database name: S_QuickC

1.00 1.01

MS-DOS

Summary:

Microsoft QuickC Compiler Versions 1.00 and 1.01 generate extra warnings when a program contains a prototype of a function in which one of the parameters is a function pointer and the function pointer accepts a void pointer type. The following are the extra warnings:

C4024 different types

C4028 parameter declaration different

This problem has been corrected in QuickC Compiler Version 2.00.

More Information:

The following program demonstrates this inconsistency with the QuickC Compiler. This problem occurs with run-time routines bsearch, lfind, lsearch, qsort because they require compare functions.


 * 1) include  void print(char,void ()(void )); void print_it(char *i);

void main(void) { print( ‘A’, print_it ); /* C4024 and C4028 occur with / } / Quick C version 1.00 and 1.01 */

void print_it( char i ) { printf( “value = %c”, i ); }

void print( char val, void (ptr)(void ) ) { (ptr)( &val ); / Invoke function pointer */ }

Copyright Microsoft Corporation 1989.