Am I allowed to make circular references with constants structs?

Viewed 585

Am I allowed to do this in C99?

typedef struct dlNode {
    dlNode* next, prev;
    void* datum;
} dlNode;

const static dlNode head={
    .next = &tail,
    .prev = NULL,
    .datum = NULL
};

const static dlNode tail={
    .next = NULL,
    .prev = &head,
    .datum = NULL
};

I can make my program work without this. It'd just be convenient.

2 Answers
Related