/in/foo.cc: In member function 'int Date::day(int, int)':
/in/foo.cc:22:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
22 | if (nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0)
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc:21:16: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
21 | if (yue == 2)
| ^
/in/foo.cc: In member function 'int Date::year()':
/in/foo.cc:29:31: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
29 | if (nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0)
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:65:24: warning: unused variable 'num' [-Wunused-variable]
65 | int nian, yue, ri, num;
| ^~~
/in/foo.cc: In member function 'int Date::day(int, int)':
/in/foo.cc:26:9: warning: control reaches end of non-void function [-Wreturn-type]
26 | }
| ^