I'm having a very hard time thinking of an example where you'd free an rvalue. Function return, maybe, but without using the value? It (almost) had to be an lvalue in order to get the malloc into it. Ah, an unconst cast. free((void *)constx), but lots of compilers don't catch that. Is there something else you were thinking of?
There's also people doing stupid shit like free(&x), but those people don't need evil macros to dick up their code. :)
I can think of one case in a project where we allocate a 4K block, fill the first n bytes with header info, and then add n bytes to the pointer and return it to something that's told it's getting a 4K - n byte block.
And then later it passes that return value to some function that deallocates the block, by calling free(((char *)p) - n).
There's also people doing stupid shit like free(&x), but those people don't need evil macros to dick up their code. :)