What the hell does this mean??

Richard Flamsholt S0rensen richard at iesd.auc.dk
Tue Mar 12 13:57:20 AEST 1991


>>>>> On 7 Mar 91 22:43:16 GMT, Robert Angelino said:
Robert> 		"spa_tclkutc.c", line 130: unacceptable operand of &
Robert> 	on this line
Robert> 		(void) sscanf(ptr,"%04d",&(primary.utc.dy));

  Well, seems as if it very much depends on the type of primary.utc.dy
- only invalid args to & are rvalues, bitfields and registers. You
guys agree with me?

Dave Schaumann:
>[...] comes to mind is that primary was declared as a register variable.

Robert Earl:
>If "dy" is a bitfield member of the struct, [...]

Scott Horne:
>Don't forget bit fields.

Will Crowder:
>This usually indicates trying to take the address of a register variable.

Karl Nicholas:
>If dy is an array, then the address (&) symbol should be omitted.

Checkpoint Technologies:
>Only thing I can think of, is if "dy" is a bit field.

Doug R. Gosciak:
>Is it possible that primary.utc.dy is the name of an array and [...]

  Of course, we *could* ask Robert what type primary.utc.dy has. But
who would ever do that? It would be a total spoiler  ;-)






--
/Richard Flamsholt
richard at iesd.auc.dk



More information about the Comp.lang.c mailing list