PRB: Warning C4026 Not Generated by Microsoft C Compiler 6.0

ID Number: Q68690

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a buglist6.00ax fixlist7.00

Summary:

SYMPTOMS

In Microsoft C versions 6.0, 6.0a, and 6.0ax, when a function is

declared to take arguments but the function does not declare formal

parameters, no warning is generated if the function is not called.

The following code, when compiled with the /W4 switch, demonstrates

this problem.

STATUS

Microsoft has confirmed this to be a problem in C versions 6.0,

6.0a, and 6.0ax. This problem was corrected in C/C++ version 7.0.

More Information:

While Microsoft C versions 6.0 and 6.0a produce no errors in the above

code, version 5.1 produces the following error:

void.c(3) : warning C4026 : function was declared with formal

argument list

Sample Code

-----------

/* Compile options needed: none

*/

void empty( int bar );

void empty( void ){}

void main( void ){}

Additional reference words: 6.00 6.00a 6.00ax