Re: [xml] A long URL causes SEGV

Question: Who can guarantee that all compilers really behave this way? 
Is there anything in the C spec that forces the compiler to evaluate 
these parentheses in exactly this manner?

Section A7.14 of the "C programming language"
'&& guarantees left-to-right evaluation: if the first operand evaluates
to 0, the value of the expression is 0. Otherwise, the right operand is
It also 'groups left-to-right' so A && B && C reads (A && B) && C

So the code is safe.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]