(C question) (s - out.s) + func(&out) -> ?

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Wed Nov 6 01:34:22 UTC 2013


On Tue, Nov 05, 2013 at 01:06:39PM -0500, Lennart Sorensen wrote:
> Functions calls are evaluated before addition/subtraction.  That's in
> the standard.  Since the function modifies the parameter, the value
> changes before the addition work is done.

Multiplication has higher precedence than addition.  I'm not talking
about that.  It's just that gcc removed parenthesis.  Eg.
    (a + b) + c
gcc can rewrite it to
    a + (b + c)
even though I explicitly said do "a+b" first.
-- 
William
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list