atf icon indicating copy to clipboard operation
atf copied to clipboard

ATF macros should not reevaluate arguments

Open jmmv opened this issue 10 years ago • 0 comments

Some macros in the atf-c and atf-c++ libraries evaluate the arguments given to the more than once. This only happens when there is a test failure, but ideally we would avoid this in case the expressions have side-effects.

I'm not sure if this is doable in C nor in C++ without the use of the new auto keyword in C++11. But we should give this some more thought and add some tests.

jmmv avatar Feb 07 '14 20:02 jmmv