1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 15:29:46 +00:00
cc65/test/err/cc65150311-3.c

27 lines
454 B
C
Raw Normal View History

/*
!!DESCRIPTION!! function pointer bugs
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!! Greg
*/
/*
see: http://www.cc65.org/mailarchive/2015-03/11726.html
and: http://www.cc65.org/mailarchive/2015-03/11734.html
*/
static int func(void) {return 0;}
static int (*p)(void);
static int n;
int main(void) {
p = func;
n = (p == &func);
n = (p == func);
n = (p > func); /* invalid C */
return 0;
}