Skip to content

Commit 008267c

Browse files
Matthias Güdemannmgudemann
Matthias Güdemann
authored andcommitted
initialize Boolean values in c_typecheck_baset
c_typecheck_baset contains the method `start_typecheck_code()` which is not called for `ansi_c`, only for `cpp`. This method initializes three Boolean values: ``` bool break_is_allowed; bool continue_is_allowed; bool case_is_allowed; ``` This patch adds a call to `start_typecheck_code()` to `ansi_c`, too. The error was observed in `ansi_c/for_scope1`.
1 parent da0b0d5 commit 008267c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ansi-c/ansi_c_typecheck.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Function: ansi_c_typecheckt::typecheck
2222

2323
void ansi_c_typecheckt::typecheck()
2424
{
25+
start_typecheck_code();
2526
for(ansi_c_parse_treet::itemst::iterator
2627
it=parse_tree.items.begin();
2728
it!=parse_tree.items.end();

src/ansi-c/c_typecheck_code.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Author: Daniel Kroening, [email protected]
1414

1515
/*******************************************************************\
1616
17-
Function: c_typecheck_baset::init
17+
Function: c_typecheck_baset::start_typecheck_code
1818
1919
Inputs:
2020

0 commit comments

Comments
 (0)