Language: C++

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

int main() {
	stack<char> S;
	char ch;
	
	while (cin >> ch)
	{
	    switch(ch)
	    {
	        case '+':
	            char a = S.top();
	            char b = S.top();
	            S.pop();
	            S.pop();
	            S.push(a+b);
	            break;
	        case '-':
	            char a = S.top();
	            char b = S.top();
	            S.pop();
	            S.pop();
	            S.push(a-b);
	            break;
	        case '*':
	            char a = S.top();
	            char b = S.top();
	            S.pop();
	            S.pop();
	            S.push(a*b);
	            break;
	        default:
	            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:26: note:   crosses initialization of 'char b'
   16 |                     char b = S.top();
      |                          ^
a.cc:15:26: note:   crosses initialization of 'char a'
   15 |                     char a = S.top();
      |                          ^
a.cc:22:26: error: redeclaration of 'char a'
   22 |                     char a = S.top();
      |                          ^
a.cc:15:26: note: 'char a' previously declared here
   15 |                     char a = S.top();
      |                          ^
a.cc:23:26: error: redeclaration of 'char b'
   23 |                     char b = S.top();
      |                          ^
a.cc:16:26: note: 'char b' previously declared here
   16 |                     char b = S.top();
      |                          ^
a.cc:28:22: error: jump to case label
   28 |                 case '*':
      |                      ^~~
a.cc:16:26: note:   crosses initialization of 'char b'
   16 |                     char b = S.top();
      |                          ^
a.cc:15:26: note:   crosses initialization of 'char a'
   15 |                     char a = S.top();
      |                          ^
a.cc:29:26: error: redeclaration of 'char a'
   29 |                     char a = S.top();
      |                          ^
a.cc:15:26: note: 'char a' previously declared here
   15 |                     char a = S.top();
      |                          ^
a.cc:30:26: error: redeclaration of 'char b'
   30 |                     char b = S.top();
      |                          ^
a.cc:16:26: note: 'char b' previously declared here
   16 |                     char b = S.top();
      |                          ^
a.cc:35:17: error: jump to case label
   35 |                 default:
      |                 ^~~~~~~
a.cc:16:26: note:   crosses initialization of 'char b'
   16 |                     char b = S.top();
      |                          ^
a.cc:15:26: note:   crosses initialization of 'char a'
   15 |                     char a = S.top();
      |                          ^
a.cc:36:21: error: 'x' was not declared in this scope
   36 |                     x = atoi(ch);
      |                     ^
a.cc:36:30: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   36 |                     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)
      |                  ~~~~~~~~~~~~^~~~~~