This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
casting and '&' both allowed in function param?
- To: gcc-bugs at gcc dot gnu dot org
- Subject: casting and '&' both allowed in function param?
- From: Andy Grover <andrew dot grover at intel dot com>
- Date: Mon, 07 Aug 2000 17:12:46 -0700
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