foo.c: In function 'days_date':
foo.c:3:31: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    3 | #define leapYear(y)  ((y%4==0)&&(y%100!=0)||(y%400==0))
      |                       ~~~~~~~~^~~~~~~~~~~~
foo.c:16:21: note: in expansion of macro 'leapYear'
   16 |                 if (leapYear(i))
      |                     ^~~~~~~~
foo.c:20:22: error: 'i' undeclared (first use in this function)
   20 |         if (leapYear(i))
      |                      ^
foo.c:3:24: note: in definition of macro 'leapYear'
    3 | #define leapYear(y)  ((y%4==0)&&(y%100!=0)||(y%400==0))
      |                        ^
foo.c:20:22: note: each undeclared identifier is reported only once for each function it appears in
   20 |         if (leapYear(i))
      |                      ^
foo.c:3:24: note: in definition of macro 'leapYear'
    3 | #define leapYear(y)  ((y%4==0)&&(y%100!=0)||(y%400==0))
      |                        ^
foo.c: In function 'diff':
foo.c:32:16: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   32 |         return abs(days_date(s1)-days_date(s2));
      |                ^~~
foo.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | #define leapYear(y)  ((y%4==0)&&(y%100!=0)||(y%400==0))
   
  
    [Hydro](https://hydro.ac)提供评测服务