On Mon March 29 2010 20:05:08 Christopher Li wrote: > Using enum namespace for member "namespace" has benefit here. It is clear > that which set of value it belongs to. E.g. if you assign SYM_NODE into > "namespace" member it *looks* is obvious wrong. We are able to catch assignment of SYM_NODE to 'enum namespace'. But we are not able to catch (SYM_NODE | SYM_ENUM) to 'enum namespace', so that the patch makes no difference. Or am I missing anything? > It also helps people understand which set of value belongs to > "namespace" member. > Make "namespace" a plain int, that message is lost. It become very > confusing for new comer > what value was allowed in this int type. The identifier ns_mask sounds clear to me, maybe namespace_mask would be better. But yes ... I am not a new comer here :-) > So back to my point. It seems making the enum more strict is just make up > rules and gain nothing in real life. It makes code looks worse just to > make strict enum type > happy. I don't think the code looks worse, nevertheless respect your attitude. Kamil -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html