mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
Add regression test for #204.
This commit is contained in:
parent
d2c89d2ba9
commit
ce0cf85386
35
test/val/static-fwd-decl.c
Normal file
35
test/val/static-fwd-decl.c
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
!!DESCRIPTION!! static forward declarations
|
||||
!!ORIGIN!! cc65 regression tests
|
||||
!!LICENCE!! Public Domain
|
||||
!!AUTHOR!! Bob Andrews
|
||||
*/
|
||||
|
||||
/*
|
||||
see: https://github.com/cc65/cc65/issues/204
|
||||
*/
|
||||
|
||||
#pragma warn(error, on)
|
||||
|
||||
typedef struct _DIRMENU
|
||||
{
|
||||
const char *name;
|
||||
struct _DIRMENU *dest;
|
||||
} DIRMENU;
|
||||
|
||||
static DIRMENU rmenu;
|
||||
|
||||
static DIRMENU lmenu = {
|
||||
"left",
|
||||
&rmenu
|
||||
};
|
||||
|
||||
static DIRMENU rmenu = {
|
||||
"right",
|
||||
&lmenu
|
||||
};
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return lmenu.dest == &rmenu && rmenu.dest == &lmenu ? 0 : 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user