/in/foo.c:2:18: error: macro parameters must be comma-separated
#define leap(int y) ((y)%4==0 && (y)%100!=0 || (y)%400==0)
^
/in/foo.c: In function 'days':
/in/foo.c:12:5: warning: implicit declaration of function 'leap' [-Wimplicit-function-declaration]
td+=leap(i)?366:365;
^~~~
/in/foo.c: In function 'main':
/in/foo.c:23:10: error: expected identifier or '(' before ',' token
struct d1,d2;
^
/in/foo.c:24:20: error: 'd1' undeclared (first use in this function)
scanf("%d-%d-%d", &d1.y,&d1.m,&d1.d);
^~
/in/foo.c:24:20: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:25:20: error: 'd2' undeclared (first use in this function)
scanf("%d-%d-%d", &d2.y,&d2.m,&d2.d);
^~