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.
This commit is contained in:
20
test/val/inline-func.c
Normal file
20
test/val/inline-func.c
Normal file
@@ -0,0 +1,20 @@
|
||||
/* 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;
|
||||
}
|
||||
Reference in New Issue
Block a user