Q:

QUEUE macro usage

I have a line that is like the following:
static STAILQ_HEAD(, my_struct) _myqueue;

I have never had a reason to use the QUEUE macros before.  Does "my_struct" have to be declared at the point this call is made?  
I am only asking because later on when I try to use a my_struct later on in my code I am getting a derferencing pointer to incomplete type message.  I am actually editing someone elses code here, and I cannot find my_struct defined anywhere

A:

No, my_struct does not have to be declared before. 
When you mention some unknown struct name in a declaration, without specifying the contents of the structure, it has an incomplete type: It just tells the compiler that there will be some struct with that name, but not yet what's in it. 
You can declare pointers to an incomplete type (which happens in the STAILQ_HEAD macro), because the compiler doesn't need to know its size or contents for that.  But you cannot instantiate an incomplete type or dereference a pointer to an incomplete type before you actually declare the complete structure.