Hello,
A lot of people (me too) write this kind of code:
struct param1_str *param1;
struct param2_str *param2;
struct param3_str *param3;
error = treat_alpha (param1, param2, param3);
if (error)
printf ("treat_alpha failed error %d, param1 = %p, "
"param2 = %p, param3 = %p",
error, param1, param2, param3);
error = treat_beta (param1, param2, param3);
if (error)
printf ("treat_beta failed error %d, param1 = %p, "
"param2 = %p, param3 = %p",
error, param1, param2, param3);
The printf() is only there for debug purposes, sometimes
it is msglog() or even sprintf().
This construct cannot be optimised efficiently by the
compiler because the variable list of parameters of
printf() is not typed - so no "const" attribute, and even
a simple:
printf ("error %d\n", error);
need to flush every registers to memory before the call and
reload everything after the call.