Skip to content

Commit 9cfa2ff

Browse files
set language mode of main() to cpp in order to get class types printed correctly
1 parent eee58de commit 9cfa2ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cpp/cpp_typecheck_function_bodies.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ void cpp_typecheckt::typecheck_function_bodies()
5454
function_bodies.erase(function_bodies.begin());
5555

5656
if(function_symbol.name==ID_main)
57+
{
5758
add_argc_argv(function_symbol);
58-
59+
function_symbol.mode=ID_cpp; //main has mode C by default
60+
}
61+
5962
exprt &body=function_symbol.value;
6063
if(body.id()=="cpp_not_typechecked")
6164
continue;

0 commit comments

Comments
 (0)