diff options
Diffstat (limited to 'support/valdiag/tests/structflexiblearray.c')
| -rw-r--r-- | support/valdiag/tests/structflexiblearray.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/support/valdiag/tests/structflexiblearray.c b/support/valdiag/tests/structflexiblearray.c new file mode 100644 index 0000000..9f1c8e3 --- /dev/null +++ b/support/valdiag/tests/structflexiblearray.c @@ -0,0 +1,24 @@ + +#ifdef TEST1 +struct tag { + int good1; + int flex[]; /* ERROR */ + int good2; +} badstruct; +#endif + +#ifdef TEST2 +struct tag { + int flex[]; /* ERROR */ +} badstruct; +#endif + +#ifdef TEST3 +struct tag { + int good1; + struct tag2 { + int good2; + int flex[]; + } nestedstruct; /* ERROR(SDCC) */ +} badstruct; +#endif |
