Ah yes, the comma operator cannot be used in constant expressions. So
we end up trying to convert the (non-constant-expression) integer 0 to
a pointer type, and failing. You're right. Thanks.
Re: readability, I still maintain that you can have your cake and eat
it too. If I really ended up writing this sort of thing a lot (which I
don't, since I don't use 'errno' to report errors in my own code), I'd
probably use a macro like
#define RETURN_ERRNO(x,y) do { errno=(x); return y; } while (0)
(Pedantic treat: I'm not happy with the macro's name, since it takes a
return value and an errno value, but not in that order. But if I called
it 'ERRNO_RETURN', it would invade the implementation's namespace. And
if I simply reversed the parameters, it would use them in the opposite
order from how they were passed, which seems unintuitive. Quite the
dilemma!
-Arthur