/in/foo.cc: In member function 'int Date::day(int, int)':
/in/foo.cc:28:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
28 | if (nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0)
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc:27:16: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
27 | if (yue == 2)
| ^
/in/foo.cc: In member function 'int Date::year()':
/in/foo.cc:35:31: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
35 | if (nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0)
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc: In constructor 'Date::Date(int, int, int, int, int, int, int, int, int, int, int, int)':
/in/foo.cc:18:9: warning: 'Date::ri1' will be initialized after [-Wreorder]
18 | int ri1;
| ^~~
/in/foo.cc:7:9: warning: 'int Date::shi' [-Wreorder]
7 | int shi;
| ^~~
/in/foo.cc:42:9: warning: when initialized here [-Wreorder]
42 | Date(int y, int m, int d, int y1, int m1, int d1,int h, int mm, int s,int h1,int mm1,int s1) : nian(y), yue(m), ri(d), nian1(y1), yue1(m1), ri1(d1),shi(h), fen(mm), miao(s),shi1(h1), fen1(mm1), miao1(s1) {}
| ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:75:24: warning: unused variable 'num' [-Wunused-variable]
75 | int nian, yue, ri, num;
| ^~~
/in/foo.cc: In member function 'int Date::day(int, int)':
/in/foo.cc:32:9: warning: control reaches end of non-void function [-Wreturn-type]
32 | }
| ^