diff options
Diffstat (limited to 'test/enum-fixed.c')
-rw-r--r-- | test/enum-fixed.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/enum-fixed.c b/test/enum-fixed.c index 9ac85ca..59b40b1 100644 --- a/test/enum-fixed.c +++ b/test/enum-fixed.c @@ -1,5 +1,5 @@ enum E1 : short; -_Static_assert(__builtin_types_compatible_p(enum E1, short)); +static_assert(__builtin_types_compatible_p(enum E1, short)); enum E2 : unsigned short { A2 = 0x7fff, @@ -7,11 +7,11 @@ enum E2 : unsigned short { A2type = __builtin_types_compatible_p(typeof(A2), unsigned short), B2type = __builtin_types_compatible_p(typeof(B2), unsigned short), }; -_Static_assert(__builtin_types_compatible_p(typeof(A2), unsigned short)); -_Static_assert(A2type == 1); -_Static_assert(__builtin_types_compatible_p(typeof(B2), unsigned short)); -_Static_assert(B2type == 1); -_Static_assert(__builtin_types_compatible_p(enum E2, unsigned short)); +static_assert(__builtin_types_compatible_p(typeof(A2), unsigned short)); +static_assert(A2type == 1); +static_assert(__builtin_types_compatible_p(typeof(B2), unsigned short)); +static_assert(B2type == 1); +static_assert(__builtin_types_compatible_p(enum E2, unsigned short)); enum E3 : long long { A3, @@ -19,18 +19,18 @@ enum E3 : long long { A3type = __builtin_types_compatible_p(typeof(A3), long long), B3type = __builtin_types_compatible_p(typeof(B3), long long), }; -_Static_assert(__builtin_types_compatible_p(typeof(A3), long long)); -_Static_assert(A3type == 1); -_Static_assert(__builtin_types_compatible_p(typeof(B3), long long)); -_Static_assert(B3type == 1); -_Static_assert(__builtin_types_compatible_p(enum E3, long long)); +static_assert(__builtin_types_compatible_p(typeof(A3), long long)); +static_assert(A3type == 1); +static_assert(__builtin_types_compatible_p(typeof(B3), long long)); +static_assert(B3type == 1); +static_assert(__builtin_types_compatible_p(enum E3, long long)); enum E4 : long long { A4 = sizeof(enum E4), A4type1 = __builtin_types_compatible_p(typeof(A4), enum E4), A4type2 = !__builtin_types_compatible_p(typeof(A4), enum E3), }; -_Static_assert(__builtin_types_compatible_p(typeof(A4), enum E4)); -_Static_assert(A4type1 == 1); -_Static_assert(!__builtin_types_compatible_p(typeof(A4), enum E3)); -_Static_assert(A4type2 == 1); +static_assert(__builtin_types_compatible_p(typeof(A4), enum E4)); +static_assert(A4type1 == 1); +static_assert(!__builtin_types_compatible_p(typeof(A4), enum E3)); +static_assert(A4type2 == 1); |