Skip to content

Avoid diagnostic code crashing when external front-ends use "C" mode #6233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/symtab2gb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ generic_includes(symtab2gb)

target_link_libraries(symtab2gb
util
ansi-c
goto-programs
json-symtab-language)

Expand Down
1 change: 1 addition & 0 deletions src/symtab2gb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SRC = \
# Empty last line

OBJ += \
../ansi-c/ansi-c$(LIBEXT) \
../util/util$(LIBEXT) \
../goto-programs/goto-programs$(LIBEXT) \
../big-int/big-int$(LIBEXT) \
Expand Down
1 change: 1 addition & 0 deletions src/symtab2gb/module_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ util
json-symtab-language
langapi
goto-programs
ansi-c
4 changes: 4 additions & 0 deletions src/symtab2gb/symtab2gb_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Author: Diffblue Ltd.
#include <iostream>
#include <string>

#include <ansi-c/ansi_c_language.h>

#include <goto-programs/goto_convert_functions.h>
#include <goto-programs/goto_model.h>
#include <goto-programs/link_goto_model.h>
Expand Down Expand Up @@ -113,6 +115,8 @@ int symtab2gb_parse_optionst::doit()
gb_filename = cmdline.get_value(SYMTAB2GB_OUT_FILE_OPT);
}
register_language(new_json_symtab_language);
// Workaround to allow external front-ends to use "C" mode
register_language(new_ansi_c_language);
config.set(cmdline);
run_symtab2gb(symtab_filenames, gb_filename);
return CPROVER_EXIT_SUCCESS;
Expand Down