1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00
cc65/test/val/inline-func.c
acqn 0b06c34dfc Added primitive support for the ISO C99 inline feature as well as the __inline__ extension.
No inlining is actually done but that part is not required by the standard.
2024-01-14 00:08:41 +08:00

21 lines
234 B
C

/* C99 inline */
#include <stdlib.h>
inline static int f(int x, ...)
{
return x * 2;
}
extern inline int g(int x);
int main(void)
{
return f(g(7)) == 42 ? EXIT_SUCCESS : EXIT_FAILURE;
}
int g(int x)
{
return x * 3;
}