Re: [sv-bc] 4.10.4 "Enumerated types in numerical expressions" - unclearness

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Thu Apr 13 2006 - 15:46:16 PDT
I think there's a problem with the definition of 'integral type' in
4.3.1.

According to 4.3.1, an enumerated type is a kind of integral type.

However, 6.9.3 distinguishes them, saying that "an enum can be converted
to an integral type without a cast, but not the other way around."

Also, according to 6.9.3, all integral types are assignment compatible.
Yet an integral value is not assignment compatible with an enum
variable.  (It is only cast compatible with it.)

This issue is relevant to --

   http://www.eda.org/sv-bc/hm/4326.html

because if the definition of integral type were repaired to exclude
enums, then packed unions would again be unable to have them as members.

-- Brad
Received on Thu Apr 13 15:46:25 2006

This archive was generated by hypermail 2.1.8 : Thu Apr 13 2006 - 15:46:31 PDT