This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
#include<stdio.h>
void foo (int a, int b, void (*hook) (int aa, int bb, int cc)) { b += a; hook (a, b, a + b); }
void qq (int a) { auto void q1 (int aa, int bb, int cc); void q1 (int aa, int bb, int cc) { printf ("%d %d %d\n", a, aa + bb, cc); }
foo (a, a + 1, q1); }
int main() { qq (10); }
Compile with: gcc -m32 -mregparm=3 -Os test.c
./a.out 10 31 -6674368
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |