Merge pull request #1905 from acqn/DeclFix

[cc65] Fixed some missing declaration features
This commit is contained in:
Bob Andrews
2022-11-05 16:03:09 +01:00
committed by GitHub
8 changed files with 194 additions and 125 deletions

View File

@@ -0,0 +1,19 @@
/* bug 1888 - cc65 fails with storage class specifiers after type specifiers */
#include <stdio.h>
int const typedef volatile x_type, * const volatile y_type;
int static failures = 0;
int extern main(void);
int main(void)
{
volatile static x_type const x = 42, * const volatile y[] = { 1 ? &x : (y_type)0 };
if (**y != 42) {
++failures;
printf("y = %d, Expected: 42\n", **y);
}
return failures;
}

View File

@@ -65,6 +65,13 @@ struct S {
int b;
};
/* _Static_assert can also appear in unions. */
union U {
int a;
_Static_assert (1, "1 should still be true.");
int b;
};
int main (void)
{