#include <iostream> using namespace std; int main() { volatile int x = 1; switch (x) { case 1: break; case 1: break; } return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:12:5: error: duplicate case value
case 1: break;
^~~~
prog.cpp:11:5: note: previously used here
case 1: break;
^~~~
Standard output is empty