On Wed, Jul 24, 2013 at 3:18 PM, Jed Davis <[email protected]> wrote:
> It's not quite as simple as it sounds, because there's unsafe code
> that's transmuting ints to C-like enums, and passing C-like enums to C
> functions that expect an actual C enum (or some other integral type).
> So this more or less forces part of the problem of specifying a
> representation.
>

Something that came up in IRC when discussing why 'struct' exists as a
special case of 1-ary sums is the idea of a #[layout="C"] attribute.
Perhaps something similar could be adapted here; if you don't have a
specific layout specified, it's undefined.

This seems like a very hard problem overall, though.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to