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