aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-03-29 14:04:09 -0700
committerMichael Forney <mforney@mforney.org>2024-03-29 14:04:09 -0700
commit8120240c1f17cf536228b79144d41168a48a4fcc (patch)
tree5328a851b87caea163ca7b9fcb185f05a32082aa /test
parent2e5ef23826b14a195a0095045403ce2ea8877e64 (diff)
Use C23 keywords in test data
Diffstat (limited to 'test')
-rw-r--r--test/alignas-0.c6
-rw-r--r--test/alignas-local-32.c2
-rw-r--r--test/alignas-local.c2
-rw-r--r--test/alignas-member.c2
-rw-r--r--test/alignas-multiple.c2
-rw-r--r--test/alignas-type.c2
-rw-r--r--test/alignas.c2
-rw-r--r--test/enum-fixed.c30
-rw-r--r--test/enum-large-value.c60
-rw-r--r--test/enum.c20
10 files changed, 64 insertions, 64 deletions
diff --git a/test/alignas-0.c b/test/alignas-0.c
index 402e7ee..80201fa 100644
--- a/test/alignas-0.c
+++ b/test/alignas-0.c
@@ -1,3 +1,3 @@
-_Alignas(0) int x;
-_Alignas(8) _Alignas(0) int y;
-_Alignas(0) _Alignas(16) int z;
+alignas(0) int x;
+alignas(8) alignas(0) int y;
+alignas(0) alignas(16) int z;
diff --git a/test/alignas-local-32.c b/test/alignas-local-32.c
index e69a105..e390713 100644
--- a/test/alignas-local-32.c
+++ b/test/alignas-local-32.c
@@ -1,4 +1,4 @@
int main(void) {
- _Alignas(32) char x;
+ alignas(32) char x;
return (unsigned long)&x % 32;
}
diff --git a/test/alignas-local.c b/test/alignas-local.c
index e1a8667..58bed54 100644
--- a/test/alignas-local.c
+++ b/test/alignas-local.c
@@ -1,4 +1,4 @@
int main(void) {
- _Alignas(16) char x;
+ alignas(16) char x;
return (unsigned long)&x % 16;
}
diff --git a/test/alignas-member.c b/test/alignas-member.c
index 965e42a..2a7039e 100644
--- a/test/alignas-member.c
+++ b/test/alignas-member.c
@@ -1,4 +1,4 @@
struct {
int x;
- _Alignas(32) char s[32];
+ alignas(32) char s[32];
} s = {123, "abc"};
diff --git a/test/alignas-multiple.c b/test/alignas-multiple.c
index 7fc2199..b232f92 100644
--- a/test/alignas-multiple.c
+++ b/test/alignas-multiple.c
@@ -1 +1 @@
-_Alignas(8) _Alignas(4) char x;
+alignas(8) alignas(4) char x;
diff --git a/test/alignas-type.c b/test/alignas-type.c
index 394045d..9713687 100644
--- a/test/alignas-type.c
+++ b/test/alignas-type.c
@@ -1 +1 @@
-_Alignas(int) char x[4];
+alignas(int) char x[4];
diff --git a/test/alignas.c b/test/alignas.c
index a0a7669..f516ab8 100644
--- a/test/alignas.c
+++ b/test/alignas.c
@@ -1 +1 @@
-_Alignas(32) long x[4] = {1, 2, 3, 4};
+alignas(32) long x[4] = {1, 2, 3, 4};
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);
diff --git a/test/enum-large-value.c b/test/enum-large-value.c
index 075021c..e4f2922 100644
--- a/test/enum-large-value.c
+++ b/test/enum-large-value.c
@@ -4,12 +4,12 @@ enum E1 {
A1type = __builtin_types_compatible_p(typeof(A1), unsigned),
B1type = __builtin_types_compatible_p(typeof(B1), long long),
};
-_Static_assert(__builtin_types_compatible_p(typeof(A1), unsigned));
-_Static_assert(A1type == 1);
-_Static_assert(__builtin_types_compatible_p(typeof(B1), unsigned));
-_Static_assert(B1type == 1);
-_Static_assert(__builtin_types_compatible_p(enum E1, unsigned));
-_Static_assert(!__builtin_types_compatible_p(enum E1, enum { A1_ = A1, B1_ = B1 }));
+static_assert(__builtin_types_compatible_p(typeof(A1), unsigned));
+static_assert(A1type == 1);
+static_assert(__builtin_types_compatible_p(typeof(B1), unsigned));
+static_assert(B1type == 1);
+static_assert(__builtin_types_compatible_p(enum E1, unsigned));
+static_assert(!__builtin_types_compatible_p(enum E1, enum { A1_ = A1, B1_ = B1 }));
enum E2 {
A2 = 0x80000000,
@@ -17,12 +17,12 @@ enum E2 {
A2type = __builtin_types_compatible_p(typeof(A2), unsigned),
B2type = __builtin_types_compatible_p(typeof(B2), int),
};
-_Static_assert(__builtin_types_compatible_p(typeof(A2), long));
-_Static_assert(A2type == 1);
-_Static_assert(__builtin_types_compatible_p(typeof(B2), long));
-_Static_assert(B2type == 1);
-_Static_assert(__builtin_types_compatible_p(enum E2, long));
-_Static_assert(!__builtin_types_compatible_p(enum E2, enum { A2_ = A2, B2_ = B2 }));
+static_assert(__builtin_types_compatible_p(typeof(A2), long));
+static_assert(A2type == 1);
+static_assert(__builtin_types_compatible_p(typeof(B2), long));
+static_assert(B2type == 1);
+static_assert(__builtin_types_compatible_p(enum E2, long));
+static_assert(!__builtin_types_compatible_p(enum E2, enum { A2_ = A2, B2_ = B2 }));
enum E3 {
A3 = 0x7fffffff,
@@ -30,12 +30,12 @@ enum E3 {
A3type = __builtin_types_compatible_p(typeof(A3), int),
B3type = __builtin_types_compatible_p(typeof(B3), long),
};
-_Static_assert(__builtin_types_compatible_p(typeof(A3), unsigned));
-_Static_assert(A3type == 1);
-_Static_assert(__builtin_types_compatible_p(typeof(B3), unsigned));
-_Static_assert(B3type == 1);
-_Static_assert(__builtin_types_compatible_p(enum E3, unsigned));
-_Static_assert(!__builtin_types_compatible_p(enum E3, enum { A3_ = A3, B3_ }));
+static_assert(__builtin_types_compatible_p(typeof(A3), unsigned));
+static_assert(A3type == 1);
+static_assert(__builtin_types_compatible_p(typeof(B3), unsigned));
+static_assert(B3type == 1);
+static_assert(__builtin_types_compatible_p(enum E3, unsigned));
+static_assert(!__builtin_types_compatible_p(enum E3, enum { A3_ = A3, B3_ }));
enum E4 {
A4 = -0x80000001l,
@@ -45,12 +45,12 @@ enum E4 {
B4type = __builtin_types_compatible_p(typeof(B4), long),
C4type = __builtin_types_compatible_p(typeof(C4), int),
};
-_Static_assert(__builtin_types_compatible_p(typeof(A4), long));
-_Static_assert(A4type == 1);
-_Static_assert(__builtin_types_compatible_p(typeof(B4), long));
-_Static_assert(B4type == 1);
-_Static_assert(__builtin_types_compatible_p(enum E4, long));
-_Static_assert(!__builtin_types_compatible_p(enum E4, enum { A4_ = A4, B4_, C4 = C4 }));
+static_assert(__builtin_types_compatible_p(typeof(A4), long));
+static_assert(A4type == 1);
+static_assert(__builtin_types_compatible_p(typeof(B4), long));
+static_assert(B4type == 1);
+static_assert(__builtin_types_compatible_p(enum E4, long));
+static_assert(!__builtin_types_compatible_p(enum E4, enum { A4_ = A4, B4_, C4 = C4 }));
enum E5 {
A5 = 0x100000000,
@@ -58,9 +58,9 @@ enum E5 {
A5type = __builtin_types_compatible_p(typeof(A5), long),
B5type = __builtin_types_compatible_p(typeof(B5), unsigned long long),
};
-_Static_assert(__builtin_types_compatible_p(typeof(A5), unsigned long));
-_Static_assert(A5type == 1);
-_Static_assert(__builtin_types_compatible_p(typeof(B5), unsigned long));
-_Static_assert(B5type == 1);
-_Static_assert(__builtin_types_compatible_p(enum E5, unsigned long));
-_Static_assert(!__builtin_types_compatible_p(enum E5, enum { A5_ = A5, B5_ = B5 }));
+static_assert(__builtin_types_compatible_p(typeof(A5), unsigned long));
+static_assert(A5type == 1);
+static_assert(__builtin_types_compatible_p(typeof(B5), unsigned long));
+static_assert(B5type == 1);
+static_assert(__builtin_types_compatible_p(enum E5, unsigned long));
+static_assert(!__builtin_types_compatible_p(enum E5, enum { A5_ = A5, B5_ = B5 }));
diff --git a/test/enum.c b/test/enum.c
index 20ea64d..7564f93 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -4,11 +4,11 @@ enum E1 {
A1type = __builtin_types_compatible_p(typeof(A1), int),
B1type = __builtin_types_compatible_p(typeof(B1), int),
};
-_Static_assert(__builtin_types_compatible_p(typeof(A1), int));
-_Static_assert(A1type == 1);
-_Static_assert(__builtin_types_compatible_p(typeof(B1), int));
-_Static_assert(B1type == 1);
-_Static_assert(__builtin_types_compatible_p(enum E1, int));
+static_assert(__builtin_types_compatible_p(typeof(A1), int));
+static_assert(A1type == 1);
+static_assert(__builtin_types_compatible_p(typeof(B1), int));
+static_assert(B1type == 1);
+static_assert(__builtin_types_compatible_p(enum E1, int));
enum E2 {
A2 = 1,
@@ -16,8 +16,8 @@ enum E2 {
A2type = __builtin_types_compatible_p(typeof(A2), int),
B2type = __builtin_types_compatible_p(typeof(B2), int),
};
-_Static_assert(__builtin_types_compatible_p(typeof(A2), int));
-_Static_assert(A2type == 1);
-_Static_assert(__builtin_types_compatible_p(typeof(B2), int));
-_Static_assert(B2type == 1);
-_Static_assert(__builtin_types_compatible_p(enum E2, unsigned));
+static_assert(__builtin_types_compatible_p(typeof(A2), int));
+static_assert(A2type == 1);
+static_assert(__builtin_types_compatible_p(typeof(B2), int));
+static_assert(B2type == 1);
+static_assert(__builtin_types_compatible_p(enum E2, unsigned));