Pure C example

utzoo!decvax!harpo!npoiv!npois!houxm!ihnp4!ihnss!knudsen utzoo!decvax!harpo!npoiv!npois!houxm!ihnp4!ihnss!knudsen
Wed Dec 29 13:57:34 AEST 1982


I agree with Darwyn: a consistent interpretation of C semantics
demands that foo(x++) get the updated value,
whatever the actual truth is for real implementations.
Yes, ++ comes from the PDP-11 and now the 6809 (and I guess the 68K?),
and the irony is, if a compiler forces the example to deliver the old value,
then the post-increment power of the '11 is wasted.
I also agree that LINT ought to kvetch about such usages.
Maybe I'm glad that dumb languages like BASIC don't let you get into

trouble with nested assignment stmts/exprs, etc.
Not afraid to write in C, but should I B?	--mike k



More information about the Comp.lang.c mailing list