Compiler Error C2093
'variable1' : cannot be initialized using address of automatic variable 'variable2'
When compiling with /Za, the program tried to use the address of an automatic variable as an initializer.
The following sample generates C2093:
// C2093.c
// compile with: /Za /c
void func() {
int li; // an implicit auto variable
int * s[]= { &li }; // C2093 address is not a constant
// OK
static int li2;
int * s2[]= { &li2 };
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for