-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paul Eggert on 2/4/2007 10:59 AM: > I don't know any way to do this. 'bool' must promote to int, so > the only plausible candidates that can be used for bit-fields are > int and signed int. But bool bitfields have a value 0 or 1, whereas > a signed bitfield has the value 0 or -1 (on two's complement hosts).
Would it be worth defining something such as BOOL_BITFIELD that expands to :1 on hosts with sane definitions of bool for the space savings, but to :2 (or even an empty expansion) on lacking hosts such as AIX where we could then define bool to signed int and still get some space savings while still getting the correct 0/1 behavior? bool foo BOOL_BITFIELD; Type-wise, it just seems nicer to use a bool bitfield than to have to revert to int, when using that bitfield as a bool. But if this idea isn't worth it, then I guess I will have to change m4 to avoid bool bitfields. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFxq+u84KuGfSFAYARAvoLAJ9EdxNWsBD72XNqMFIz8B4tkAyRyQCgqEwa usgE2aFtpIpCxDrTtIpNR20= =2QCM -----END PGP SIGNATURE-----