Deep question for the REAL C GURU's out there ...

Kurt Wall kwall
Thu Feb 24 20:27:13 PST 2005


On Thursday 24 February 2005 10:25, Roger Oberholtzer enlightened us 
thusly:

> update the value: ++(ptr->counter)
>
> update the pointer: (++ptr)->counter
>
> get a new hobby: ++ptr->counter

Indeed. And cause demons to fly out of your nose.

> It is another one of my quirks. I explicitly specify ordering. Never
> trust a compiler more than you need to.

I prefer not to have to remember precedence; I specify evaluation
order when I can't remember precedence; I specify precendence 
explicitly.

True, I suppose, but, as a minor point, precedence and sequence
points are determined by the standard. Any compiler worth the name
should get that right.

Kurt


More information about the Linux-users mailing list