From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Merrill To: bothner@cygnus.com (Per Bothner), egcs@cygnus.com Subject: Re: bool Date: Tue, 11 Nov 1997 12:13:00 -0000 Message-id: References: <199711111843.KAA03525.cygnus.egcs@cygnus.com> X-SW-Source: 1997-11/msg00418.html >>>>> Per Bothner writes: > Andrew Borthwick : >> I wrote a little test program and found that with the 1997/11/05 snapshot, >> a bool has a size of 4 bytes. > I had thought this was fixed. > If not, it really should be. sizeof(bool) must be one. > Any other choice will be "unexpected" by reasonable progragrammers. > Whether it takes more time to load a one-byte bool than a 4-byte > or 8-byte bool is irrelevant - otherwise, we should make short > be 4 bytes as well. Nonsense. Most uses of bool are to store boolean values. Most of these values would have been type 'int' if 'bool' were not available. If you want packed data, you can use a bitvector or 'unsigned char'. Jason