Fixed support for storage class specifiers after type specifiers.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
|
||||
/* bug #1888 - The compiler doesn't accept valid data declarations */
|
||||
|
||||
/* The following is a valid declaration but not accepted by the compiler */
|
||||
int static a;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
19
test/val/decl-mixed-specifiers.c
Normal file
19
test/val/decl-mixed-specifiers.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user