Language: C++

#include <stdlib.h>
#include <iostream>
#include <stack>
using namespace std;

int main() {
	stack<int> S;
	char ch;
	
	while (cin >> ch)
	{
	    switch(ch)
	    {
	        case '+':
	            int a = S.top();
	            int b = S.top();
	            S.pop();
	            S.pop();
	            S.push(a+b);
	            break;
	        case '-':
	            int a = S.top();
	            int b = S.top();
	            S.pop();
	            S.pop();
	            S.push(a-b);
	            break;
	        case '*':
	            int a = S.top();
	            int b = S.top();
	            S.pop();
	            S.pop();
	            S.push(a*b);
	            break;
	        default:
	            int x = atoi(ch);
	            S.push(x);
	    }
	}
	
	cout << S.top() << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: jump to case label
   21 |                 case '-':
      |                      ^~~
a.cc:16:25: note:   crosses initialization of 'int b'
   16 |                     int b = S.top();
      |                         ^
a.cc:15:25: note:   crosses initialization of 'int a'
   15 |                     int a = S.top();
      |                         ^
a.cc:22:25: error: redeclaration of 'int a'
   22 |                     int a = S.top();
      |                         ^
a.cc:15:25: note: 'int a' previously declared here
   15 |                     int a = S.top();
      |                         ^
a.cc:23:25: error: redeclaration of 'int b'
   23 |                     int b = S.top();
      |                         ^
a.cc:16:25: note: 'int b' previously declared here
   16 |                     int b = S.top();
      |                         ^
a.cc:28:22: error: jump to case label
   28 |                 case '*':
      |                      ^~~
a.cc:16:25: note:   crosses initialization of 'int b'
   16 |                     int b = S.top();
      |                         ^
a.cc:15:25: note:   crosses initialization of 'int a'
   15 |                     int a = S.top();
      |                         ^
a.cc:29:25: error: redeclaration of 'int a'
   29 |                     int a = S.top();
      |                         ^
a.cc:15:25: note: 'int a' previously declared here
   15 |                     int a = S.top();
      |                         ^
a.cc:30:25: error: redeclaration of 'int b'
   30 |                     int b = S.top();
      |                         ^
a.cc:16:25: note: 'int b' previously declared here
   16 |                     int b = S.top();
      |                         ^
a.cc:35:17: error: jump to case label
   35 |                 default:
      |                 ^~~~~~~
a.cc:16:25: note:   crosses initialization of 'int b'
   16 |                     int b = S.top();
      |                         ^
a.cc:15:25: note:   crosses initialization of 'int a'
   15 |                     int a = S.top();
      |                         ^
a.cc:36:34: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   36 |                     int x = atoi(ch);
      |                                  ^~
      |                                  |
      |                                  char
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/stdlib.h:36,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~