- status: open --> pending
icProfileHeader.h has this:
typedef enum {
icFlare0 = 0x00000000, /* 0% flare */
icFlare100 = 0x00000001, /* 100% flare */
} icMeasurementFlare;
/** Convenience Enum Definition - Not defined in ICC specification*/
#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
#define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
and
ypedef enum {
icGeometryUnknown = 0x00000000, /* Unknown geometry */
icGeometry045or450 = 0x00000001, /* 0/45, 45/0 */
icGeometry0dord0 = 0x00000002, /* 0/d or d/0 */
} icMeasurementGeometry;
/** Convenience Enum Definition - Not defined in ICC specification*/
#define icMaxEnumGeometry ((icMeasurementGeometry) 0xFFFFFFFF)
#define icMaxGeometry ((icMeasurementGeometry) 0xFFFFFFFF)
In both cases gcc 4.2.1 rightly warns of overflow in constant conversion when icMaxEnumGeometry and icMaxFlare are used. This is because in C++ enums have exactly the number of bits needed toicMeasurementGeometry need only two bits to represent the values.
So even though icMaxEnumGeometry and icMaxFlare are not part of the spec, I see no other way then including them in their respective enums to get enums with suitable widths. This is the way I chose for the openSUSE package I offer via the openSUSE buildservice.