ambiguous why?

Rich Salz rsalz at bbn.com
Wed Apr 6 06:28:55 AEST 1988


Eddie Wyatt asks why this
	*a+=*b;
gives this message:
	warning ambiguous assigment: assignment op taken
The Walking Lint replies:
	Your compiler scans "+=" as two tokens rather than one.

Yeah, that's obviously what it's doing, but it's wrong.  The Rules say to
take the longest possible token you can, so "*a+=*b" should be parsed as
	* a += * b

Sounds like Eddie's found a compiler bug.
	/r$
-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.



More information about the Comp.lang.c mailing list