libsel4: Make enum padding types one less in value so that they are INT_MAX

Having the padding types as INT_MAX + 1 means C++ compilers will end up using
a signed 64 bit integer, as that is the only type that can have a value that
large, as well as the negative values our enums typically contain
This commit is contained in:
Adrian Danis
2014-10-31 09:16:07 +11:00
parent 1d51025fe8
commit 436c216d0e

View File

@@ -17,7 +17,7 @@
* the same size as an 'int'.
*/
#define SEL4_FORCE_LONG_ENUM(type) \
_enum_pad_ ## type = (1U << ((sizeof(int)*8) - 1))
_enum_pad_ ## type = (1U << ((sizeof(int)*8) - 1)) - 1
#ifndef CONST
#define CONST __attribute__((__const__))