From 008267c77138cc75a7843463defd2345e3c0b99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20G=C3=BCdemann?= Date: Fri, 3 Feb 2017 01:14:07 +0100 Subject: [PATCH] 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`. --- src/ansi-c/ansi_c_typecheck.cpp | 1 + src/ansi-c/c_typecheck_code.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ansi-c/ansi_c_typecheck.cpp b/src/ansi-c/ansi_c_typecheck.cpp index 53daf912dc2..08da6bbae01 100644 --- a/src/ansi-c/ansi_c_typecheck.cpp +++ b/src/ansi-c/ansi_c_typecheck.cpp @@ -22,6 +22,7 @@ Function: ansi_c_typecheckt::typecheck void ansi_c_typecheckt::typecheck() { + start_typecheck_code(); for(ansi_c_parse_treet::itemst::iterator it=parse_tree.items.begin(); it!=parse_tree.items.end(); diff --git a/src/ansi-c/c_typecheck_code.cpp b/src/ansi-c/c_typecheck_code.cpp index 77f3bf3ba50..db02693b26d 100644 --- a/src/ansi-c/c_typecheck_code.cpp +++ b/src/ansi-c/c_typecheck_code.cpp @@ -14,7 +14,7 @@ Author: Daniel Kroening, kroening@kroening.com /*******************************************************************\ -Function: c_typecheck_baset::init +Function: c_typecheck_baset::start_typecheck_code Inputs: