Skip to content

Commit 4c34be4

Browse files
committed
Demote goto/destructor interaction to debug message level
Compilation using goto-cc used to be very noisy. Added source location information to make messages more comprehensible.
1 parent ea29351 commit 4c34be4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/goto-programs/goto_convert.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,19 @@ void goto_convertt::finish_gotos(goto_programt &dest)
215215

216216
if(!stack_is_prefix)
217217
{
218-
warning() << "Encountered goto (" << goto_label <<
219-
") that enters one or more lexical blocks;" <<
220-
"omitting constructors and destructors." << eom;
218+
debug().source_location=i.code.find_source_location();
219+
debug() << "encountered goto `" << goto_label
220+
<< "' that enters one or more lexical blocks; "
221+
<< "omitting constructors and destructors" << eom;
221222
}
222223
else
223224
{
224225
auto unwind_to_size=label_stack.size();
225226
if(unwind_to_size<goto_stack.size())
226227
{
227-
status() << "Adding goto-destructor code on jump to " <<
228-
goto_label << eom;
228+
debug().source_location=i.code.find_source_location();
229+
debug() << "adding goto-destructor code on jump to `"
230+
<< goto_label << "'" << eom;
229231
goto_programt destructor_code;
230232
unwind_destructor_stack(
231233
i.code.add_source_location(),

0 commit comments

Comments
 (0)