How to declare static variable prior to its definition? The use case is there is other global variable is using it before it is defined. And I don't want to move the definition to top.
Example code:
extern static int a; //compiler error, but I need to declare 'a' because it is used below by 'x'
typedef struct{
int * dd;
}X;
static X x={&a}; //this variable needs to use 'a'
static int a=5; //this is where 'a' defined
Above code is compile error.
=== Update ====
Well, I found the solution myself. Just remove the extern
keyword.