Warning C4035 When Compiling with /Zg and Either /W3 or /W4

ID Number: Q65647

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a buglist6.00ax

Summary:

The Microsoft C Compiler versions 6.0, 6.0a, and 6.0ax incorrectly

produce the following error when the sample program below is compiled

at warning level 3 (/W3) or 4 (/W4) with the /Zg option to generate

function prototypes:

warning C4035: 'func' : no return value

The compiler generates the warning only when the above options are

used together.

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

and 6.0ax. We are researching this problem and will post new

information here as it becomes available.

Sample Code

-----------

/* Compile options needed: /Zg /W3

*/

int func(void)

{

return(1);

}

Additional reference words: 6.00 6.00a 6.00ax