"C1063: Stack Overflow" Caused by Taking Address of Constant

ID Number: Q68390

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

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

Summary:

The Microsoft C Compiler versions 6.0, 6.0a, and 6.0ax produce the

following error when the sample program below is compiled with any

memory model or optimization:

fatal error C1063: compiler limit : compiler stack overflow

The error occurs when the compiler attempts to compile the following

line in the code:

f_one(&"ABC");

Changing the line above to the following will eliminate the error:

char *x = "ABC";

...

f_one(&x);

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.

Sample Code

-----------

/* Compile options needed: none

*/

void main(void)

{

f_one(&"ABC");

}