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
"Is it a case that &X is not the same as &(X) ... ?"
It may (erroneously?) be so for v8.05a, but IMHO the reported error is unjustified.
I am happy to report that Gimpel's lint backs me up on that opinion.
FYI, Gimpel provides a "Blank Slate (C)" link where one can post these kinds of snippets to get their product's opinion:
www.gimpel-online.com/OnlineTesting.html