foo.c: In function 'days_date':
foo.c:3:30: 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:3:30: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
3 | #define leapYear(y) ((y%4==0)&&(y%100!=0)||(y%400==0))
| ~~~~~~~~^~~~~~~~~~~~
foo.c:21:21: note: in expansion of macro 'leapYear'
21 | if (leapYear(i))
| ^~~~~~~~
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)提供评测服务