Paul Eggert wrote:
> > +#  define error(status, ...) \
> > +     ((error)(0, __VA_ARGS__), (status) ? exit (status) : (void)0)
> 
> We can do a bit better than that by using 'unreachable ()' instead of 
> 'exit (status)', and passing 'status' (instead of 0) to the underlying 
> error function. This saves a function call

In terms of functions calls, I don't think it makes a difference,
whether exit() gets called from within the error() invocation [1] or
after the error() invocation. 

[1] lib/error.c:285

> Also, it's better to not evaluate 'status' twice. Not that I think 
> 'status' should have side effects or even that it does have side effects 
> in any Gnulib-using code, just that it's more hygienic in case some 
> caller foolishly puts side effects there.

Indeed, having it evaluate only once is better. Thanks.

> +     __gl_error_call (rpl_error, status, __VA_ARGS)

What is __VA_ARGS ? Did you mean __VA_ARGS__ ?

Bruno




Reply via email to