This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

casting and '&' both allowed in function param?


I am using gcc 2.95 and it's emitting the message: "invalid lvalue in
unary '&'" on the following function call:

Region is a void * and Lookup's 7 param is a NAMED_OBJECT**.

Status = Lookup (WalkState->ScopeInfo, Arg->Value.Name,
                 TYPE_REGION, IMODE_EXECUTE,
                 NS_SEARCH_PARENT, WalkState,
                 &((NAMED_OBJECT *)Region));

The last line works under VC. Is this a case where VC is overly
accepting, or is this actually a bug in GCC?

Thanks -- Regards -- Andy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]