+1  A: 

The problem is that this

struct foo { /*...*/ } * bar;

defines bar to be a foo*, not a foo. Try

struct foo { /*...*/ } bar;

instead.

sbi
The rest of the code in the file assume that `Frame` is a pointer to a `frame` rather than an instance of it itself. If I do what you suggest, it would no longer be. Also unsure why that would be an issue?
Morinar
It's not an issue if you know what you're doing. For example, `sizeof(*bar)` will give you the size of the struct, but `sizeof(bar)` only gives you the size of the pointer. On 32bit machines with 8bit `char` pointers are 4 bytes, hence `sizeof(bar)==4`.
sbi
A: 

Are you running a Debug build? Debugging a release build will often seem to work, but the debugger will report garbage values for variables.

If that's not it, then I'd try to verify if it is a compiler/syntax issue by splitting up the definition so you define the struct as a typedef and then define the pointer in a separate statement. (This would arguably make the code more readable/maintainable anyway - if you don't trust the code above then rewriting it in a way that you do trust is advisable)

Jason Williams
I am definitely in Debug (I've never even compiled a Release build of our app... whole other team does those sorts of things). Also: good advice about splitting the statement. I'll try that.
Morinar
+1  A: 

Try declaring the struct frame and defining a variable of that type in different statements.

struct frame {
    /* .. Various other fields, etc */
    struct frame *next;
};
static struct frame *Frame = NULL;

Maybe the static messes up Visual Studio.

pmg
Great idea (what Jason suggested also), but just tried it and it still didn't work. Completely baffled here.
Morinar
+2  A: 

There's something about your situation described by Microsoft: http://support.microsoft.com/kb/822551

WORKAROUND: Microsoft strongly recommends that you use unique type definitions.

pmg
As detailed in the above comments, this appears to be the issue. Definitely spectacularly annoying.
Morinar
Strange - the KB indicates that the problem is in VS 2003 and they have a hotfix for it. Looks like the fix regressed in VS 2005 or VS 2008.
Michael Burr