example_01.cpp:11:17: warning: unsequenced modification and access to 'a' [-Wunsequenced]
return a + fun(--a);
~ ^
1 warning generated.
➜ d25 vim example_01.cpp
1 #include
2 using namespace std;
3 int fun(int a);
4 int main() {
5 cout << fun(100);
6 return 0;
7 }
8 int fun(int a) {
9 if (a == 1)
10 return 1;
11 return a + fun(--a);
12 }
~