Skip to content

Commit c61056d

Browse files
author
martin
committed
Replace the parsing of goto_check options with the appropriate macro
This adds some functionality for options that were previously allowed but silently ignored as they didn't make it from cmdline to goto_check.
1 parent 691bd50 commit c61056d

File tree

1 file changed

+2
-47
lines changed

1 file changed

+2
-47
lines changed

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -130,53 +130,8 @@ void goto_diff_parse_optionst::get_command_line_options(optionst &options)
130130
else
131131
options.set_option("propagation", true);
132132

133-
// check array bounds
134-
if(cmdline.isset("bounds-check"))
135-
options.set_option("bounds-check", true);
136-
else
137-
options.set_option("bounds-check", false);
138-
139-
// check division by zero
140-
if(cmdline.isset("div-by-zero-check"))
141-
options.set_option("div-by-zero-check", true);
142-
else
143-
options.set_option("div-by-zero-check", false);
144-
145-
// check overflow/underflow
146-
if(cmdline.isset("signed-overflow-check"))
147-
options.set_option("signed-overflow-check", true);
148-
else
149-
options.set_option("signed-overflow-check", false);
150-
151-
// check overflow/underflow
152-
if(cmdline.isset("unsigned-overflow-check"))
153-
options.set_option("unsigned-overflow-check", true);
154-
else
155-
options.set_option("unsigned-overflow-check", false);
156-
157-
// check overflow/underflow
158-
if(cmdline.isset("float-overflow-check"))
159-
options.set_option("float-overflow-check", true);
160-
else
161-
options.set_option("float-overflow-check", false);
162-
163-
// check for NaN (not a number)
164-
if(cmdline.isset("nan-check"))
165-
options.set_option("nan-check", true);
166-
else
167-
options.set_option("nan-check", false);
168-
169-
// check pointers
170-
if(cmdline.isset("pointer-check"))
171-
options.set_option("pointer-check", true);
172-
else
173-
options.set_option("pointer-check", false);
174-
175-
// check for memory leaks
176-
if(cmdline.isset("memory-leak-check"))
177-
options.set_option("memory-leak-check", true);
178-
else
179-
options.set_option("memory-leak-check", false);
133+
// all checks supported by goto_check
134+
PARSE_OPTIONS_GOTO_CHECK(cmdline, options);
180135

181136
// check assertions
182137
if(cmdline.isset("no-assertions"))

0 commit comments

Comments
 (0)