added gcc example for inner-function definitions and declarations with the "auto" keyword

This commit is contained in:
Richard Thier 2025-04-24 18:32:39 +02:00
parent 2579b4f105
commit c40c4d035b

25
innerf.c Normal file
View File

@ -0,0 +1,25 @@
#include <stdio.h>
int main() {
int a = 0;
int b = 40;
int c = 2;
inline void lf(register int* r) {
a += *r;
}; // semicolon(;) not needeed!
/*
// Same as above...
inline auto void lf(register int* r);
inline void lf(register int* r) {
a += *r;
}; // semicolon(;) not needeed!
*/
lf(&b);
lf(&c);
printf("%d\n", a);
}