This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

address of struct member

The following code compiles fine with C V7.20

struct {
        struct {
                char a;
        } t;
} b;

void main(void) {
        b.t.a=0;
        (&b)->t.a=0;
        (&(b.t))->a=0; (*)
}

and gives an error with V8.05a for line (*)

TEST.C(10): error C200: left side of '->' requires struct/union pointer

FYI, It is the result of a macro a macro that expects a pointer and for which the address of a struct member was passed. GeertB

0