Stupid users
Peter Holzer
hp at vmars.tuwien.ac.at
Wed Aug 8 21:34:36 AEST 1990
KPURCELL at LIVERPOOL.AC.UK writes:
>Of course you could write:
> foo = ++a+++++b++;
>and confuse a lot of people (and compilers!)
^^^^^^^^^^^^^^
They surely are confused by this piece of non-C code:
The above code is equivalent to:
foo = ((++a)++)++ + b++;
(++ a) is not an l-value; so (++ a)++ is not valid C.
Any compiler accepting this code is broken.
Regards, Peter
--
| _ | Peter J. Holzer | Think of it |
| |_|_) | Technische Universitaet Wien | as evolution |
| | | | hp at vmars.tuwien.ac.at | in action! |
| __/ | ...!uunet!mcsun!tuvie!vmars!hp | Tony Rand |
More information about the Comp.lang.c
mailing list