Skip to content

Commit 34a476f

Browse files
committed
dump-c: Replace --use-system-headers by --no-system-headers
The user-friendly default now is to produce #include statements for C library functions; this can be disabled using --no-system-headers.
1 parent e2cfed3 commit 34a476f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

CHANGELOG

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* GOTO-ANALYZER: New option --unreachable-functions, --reachable-functions
99
* GOTO-INSTRUMENT: New option --undefined-function-is-assume-false
1010
* GOTO-INSTRUMENT: New option --remove-function-body
11-
* GOTO-INSTRUMENT: New option --use-all-headers
11+
* GOTO-INSTRUMENT: New option --use-all-headers, changed --use-system-headers to
12+
--no-system-headers
1213

1314

1415
5.7

regression/goto-instrument/typedef4/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
main.c
3-
--dump-c --use-system-headers
3+
--dump-c
44
^EXIT=0$
55
^SIGNAL=0$
66
--

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ int goto_instrument_parse_optionst::doit()
621621
if(cmdline.isset("dump-c") || cmdline.isset("dump-cpp"))
622622
{
623623
const bool is_cpp=cmdline.isset("dump-cpp");
624-
const bool h_libc=cmdline.isset("use-system-headers");
624+
const bool h_libc=!cmdline.isset("no-system-headers");
625625
const bool h_all=cmdline.isset("use-all-headers");
626626
namespacet ns(symbol_table);
627627

@@ -1542,7 +1542,7 @@ void goto_instrument_parse_optionst::help()
15421542
" --remove-function-body <f> remove the implementation of function <f> (may be repeated)\n"
15431543
"\n"
15441544
"Other options:\n"
1545-
" --use-system-headers with --dump-c/--dump-cpp: generate C source with libc includes\n" // NOLINT(*)
1545+
" --no-system-headers with --dump-c/--dump-cpp: generate C source expanding libc includes\n" // NOLINT(*)
15461546
" --use-all-headers with --dump-c/--dump-cpp: generate C source with all includes\n" // NOLINT(*)
15471547
" --version show version and exit\n"
15481548
" --xml-ui use XML-formatted output\n"

src/goto-instrument/goto_instrument_parse_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Author: Daniel Kroening, kroening@kroening.com
2626
"(all)" \
2727
"(document-claims-latex)(document-claims-html)" \
2828
"(document-properties-latex)(document-properties-html)" \
29-
"(dump-c)(dump-cpp)(use-system-headers)(use-all-headers)(dot)(xml)" \
29+
"(dump-c)(dump-cpp)(no-system-headers)(use-all-headers)(dot)(xml)" \
3030
OPT_GOTO_CHECK \
3131
/* no-X-check are deprecated and ignored */ \
3232
"(no-bounds-check)(no-pointer-check)(no-div-by-zero-check)" \

0 commit comments

Comments
 (0)