| Witness this innocent chunk of code, from fs/intermezzo/journal.c in a Linux kernel tree near you [at least until it's fixed - OG]: #define BUFF_ALLOC(newbuf, oldbuf) \Do I really need to explain why returning from a macro is a bad, bad, bad, god-awful idea? Consider: void foo(void) Resource allocation and deallocation should always be handled with care. Sequence points where resource book keeping is required must be explicit. So I have spoken. Muli the weary. ----------------------------------------------- The macro has so many problems - side effects on both buffers, control flow elements (if, return), memory allocation and deallocation - that the author should be chained to a tech support desk for at least a few years. How the hell did Linus let it through? Shuddddderrrrr. |