On 21 Apr 2015 09:18, "Pekka Paalanen" <ppaala...@gmail.com> wrote: > Two things I came up with in the IRC discussion was that only <arg> > types of int an uint are eligible for enums, and only uint for > bitfields. I think wayland-scanner should enforce that.
I just realised another aspect of this. Can a (non-bitfield) enum be used both as an int and a uint? So some *int* argument somewhere has enum="bla", and a *uint* argument somewhere else has enum="bla" as well. What about enums that list negative values, can they be used as uints? I feel that this would be extremely prone to bugs, and in fact I think this is a situation where semantic information of enum style arguments can help catch bugs in C code (which so far we haven't seen yet in this debate). Should this be enforced by the scanner? Or is there some crazy situation in which it makes sense?
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel