]> git.sur5r.net Git - cc65/blob - test/val/static-fwd-decl.c
goto.c warning fix for implicit truncation
[cc65] / test / val / static-fwd-decl.c
1 /*
2   !!DESCRIPTION!! static forward declarations
3   !!ORIGIN!!      cc65 regression tests
4   !!LICENCE!!     Public Domain
5   !!AUTHOR!!      Bob Andrews
6 */
7
8 /*
9   see: https://github.com/cc65/cc65/issues/204
10 */
11
12 #pragma warn(error, on)
13
14 typedef struct _DIRMENU
15 {
16     const char *name;
17     struct _DIRMENU *dest;
18 } DIRMENU; 
19
20 static DIRMENU rmenu;
21
22 static DIRMENU lmenu = {
23     "left",
24     &rmenu
25 };
26
27 static DIRMENU rmenu = {
28     "right",
29     &lmenu
30 };
31
32 int main(void)
33 {
34     return lmenu.dest == &rmenu && rmenu.dest == &lmenu ? 0 : 1;
35 }