On Tue, Jan 17, 2017 at 10:57 AM, Ian Lepore <i...@freebsd.org> wrote:

> In my experience, enums are a superior way to define integer constants
> (compared to #define), but they are pure poison as variable types in
> APIs and structures because their size is a compiler implementation
> choice.
>

Well, to some extent. For example, the amd64 sysV ABI says that enum types
are signed fourbyte, with a footnote that "C++ and some implementations of
C permit enums larger than an int. The underlying type is bumped to an
unsigned int, long int or unsigned long int, in that order."

-Ben
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to