Chris Wedgwood wrote: > On Thu, Apr 26, 2007 at 11:38:52PM +0900, Neil Booth wrote: >>>> memcpy(data + nhead, skb->head, >>>> #ifdef NET_SKBUFF_DATA_USES_OFFSET >>>> skb->tail); >>>> #else >>>> skb->tail - skb->head); >>>> #endif >>> If memcpy happens to be a macro, that is not valid C. >> It's undefined rather than invalid. GCC makes an effort to >> do "what you'd expect". > > I think I prefer sparse breaking on things like this (so we can find > such uglies and correct them.). I tend to agree; however, if GCC accepts the code, I would prefer to have Sparse parse it and warn, rather than failing to parse it. I would gladly take a clean patch that allows this code to work the same way GCC does. Bonus if the patch supplies a -Wpreprocessor-conditional-in-macro-arguments or similar, and I wouldn't object to having such a warning on by default. - Josh Triplett
Attachment:
signature.asc
Description: OpenPGP digital signature