Re: [chrony-dev] GCC issue |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On Tue, 21 Jan 2014, Miroslav Lichvar wrote:
On Tue, Jan 21, 2014 at 10:23:29AM -0800, Bill Unruh wrote:
You need the fprintf()<0 since fprintf almost always returns a non-zero
number. Only if it is negative is it an error.
Right. I missed that.
I have no idea why the bitwise or would fail.
Apparently there is no sequence point with the | operator and the
compiler is free to use any order.
http://en.wikipedia.org/wiki/Sequence_point
Lets hope that
r=(fprintf()<0) ;
r|=fclose()
does not get optimized away by the compiler, and then one runs into the same
problem.
--
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273
Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324
UBC, Vancouver,BC | Program in Cosmology | unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.