![]() | |||||||||||
Messages in this thread |
On Fri, Sep 24, 2004 at 07:46:20PM -0700, Linus Torvalds wrote: > So I would stronly suggest (and I may make sparse warn) against using > non-integertyped enum values with any enum that actually has any backing > store (ie if you ever use a variable of type "enum myenum", that would > result in a warning - you can really just use the values "one" and "two" > directly). Linus, backing store is irrelevant here (and BTW, variables are no better or worse than arguments / structure fields / return values / argument of sizeof / etc.) a) integer type equivalent to particular enum is up to compiler; anything that depends on it is at the very least non-portable. b) __bitwise doesn't break anything; __le32 enum members are just as OK as int ones. c) its enum members where we are not doing what gcc does; enum itself is trivial to deal with. So that's where the warnings should be. Anyway, I'll send you sparse patches tomorrow when I rediff that stuff to your current tree... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||
| Last update: 2005-03-22 14:06 [from the cache] ©2003-2008 | |||||||||||