Re: parameter evaluation order

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

 



jessevdam <jessevdam@xxxxxxxxxxx> writes:

> I would like to be able to tell the gcc compiler is should evaluate the
> parameter in the left to right order.
>
> Putting them in separate values is not an solution for me, because that does
> not work when you use the && or || operator. Then i would also to put
> separate if sentences for them, which is not handy since I'm writing a code
> generator.
>
> How can I turn off this optimization which causes the evaluation order to be
> changed?

You can't.  Sorry.  There is no specific optimization which rearranges
parameters.  There is simply nothing which forces them to be evaluated
in any particular order.

If you are writing a code generator, I recommend generating if
statements for && and || even if it is not handy.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux