It looks correct to me. That said, a function-like macro that "returns" a pointer to a buffer with
automatic storage duration is likely to confuse programmers, since actual functions cannot do that. There is a good chance that people will accidentally use the object beyond its lifetime, or pass it to
free()
, or some similar mistake. So while you
can do this, I"m not sure that you
should. —
Nate Eldredge just now