casting and '&' both allowed in function param?

Andy Grover andrew.grover@intel.com
Mon Aug 7 17:13:00 GMT 2000


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



More information about the Gcc-bugs mailing list