#include <iostream> int main() { int b = 2; if (int a = 0) { } else { int a; } }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:9:9: error: redeclaration of ‘int a’
int a;
^
prog.cpp:6:11: note: ‘int a’ previously declared here
if (int a = 0) {
^
Standard output is empty