2012/2/6 Alexandre Almeida :
>
> Okay, I am sorry for not knowing that there is an option to make enum types
> as short as possible. Anyway, I think it should be a default option. Do you
> agree?
No I don't agree because that would cause an ABI change. Note some
targets (arm-eabi though not arm
Okay, I am sorry for not knowing that there is an option to make enum types as
short as possible. Anyway, I think it should be a default option. Do you agree?
On Sun, Feb 5, 2012 at 12:58 PM, Jonathan Wakely wrote:
> 2012/2/5 David Brown :
>>
>> Enum types in C++ can be any integer type big enough to cover the required
>> range. I think most C++ compilers use the smallest integer type that covers
>> the range.
>
> With the three C++ compilers I tried e
2012/2/5 David Brown :
>
> Enum types in C++ can be any integer type big enough to cover the required
> range. I think most C++ compilers use the smallest integer type that covers
> the range.
With the three C++ compilers I tried enums are int-sized for
compatiblity reasons, so that enums declare
On 05/02/12 17:29, Alexandre Almeida wrote:
What do you think about making enum types have only the size needed
for the number of constants held? If an enum type has 256 constants
or less, for example, it needs only one byte. If it has between 257
and 65536 constants, in the other hand, it needs
What do you think about making enum types have only the size needed for the
number of constants held?
If an enum type has 256 constants or less, for example, it needs only one byte.
If it has between 257 and 65536 constants, in the other hand, it needs two
bytes.