which checks that a declaration after TCC implicitely declares an internally used function (memmove here) doesn't create any problem.
Unified · Split
| @@ -0,0 +1,20 @@ | ||
| 1 | +/* Test that the memmove TCC is emitting for the struct copy | |
| 2 | + and hence implicitely declares can be declared properly also | |
| 3 | + later. */ | |
| 4 | +struct S { int a,b,c,d, e[1024];}; | |
| 5 | +int foo (struct S *a, struct S *b) | |
| 6 | +{ | |
| 7 | + *a = *b; | |
| 8 | + return 0; | |
| 9 | +} | |
| 10 | + | |
| 11 | +void *memmove(void*,void*,long); | |
| 12 | +void foo2 (struct S *a, struct S *b) | |
| 13 | +{ | |
| 14 | + memmove(a, b, sizeof *a); | |
| 15 | +} | |
| 16 | + | |
| 17 | +int main() | |
| 18 | +{ | |
| 19 | + return 0; | |
| 20 | +} | |
Empty file added.