A diagnostic "gotcha"

Herb Kanner kanner at tymix.UUCP
Thu Feb 6 07:48:35 AEST 1986


A line of C code that looked like:

	node_mem[*dotp] = val & 0xff;

produced the diagonistic "operands of + have incompatible types."  The
error was that *dotp was not of type int, and a[b] being a euphemism for
*(a + b), it complained about the operands of addition.
-- 
Herb Kanner
McDonnell Douglas (TYMNET)
...!hplabs!oliveb!tymix!kanner



More information about the Comp.lang.c mailing list