An old colleague in my firma write C sentences like the next:
#include <stdio.h>
#include <stdint.h>
typedef struct {
char word;
int age;
} Info;
typedef struct {
Info info[1];
}TCBInfoTab;
int main(int argc, char *argv[]){
const size_t storesize = (uintptr_t) &(((TCBInfoTab *) 0)->info[0]); <-------------Here
return 1;
}
Please, any volunteer would like to explain me what make the sentence: const size_t storesize = (uintptr_t) &(((TCBInfoTab *) 0)->info[0]);
I only understand a cast to a TCBInfoTab from 0, then get the address of a info[0] parameter (but from 0???!!!)and cast it to uintptr_t and finaly stores it in a size_t WTF???
Thanks in advance