diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-06-14 08:18:37 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-06-16 07:30:46 +0200 |
commit | c35e829a762ef62b83a7843507ffbae847353a08 (patch) | |
tree | fa081c5cd4687ea36eb488f159737b15ee1dc7d6 /src/print.c | |
parent | d4f854e5b2d6b10b50dee40831c4e107d76cc254 (diff) | |
download | bison-c35e829a762ef62b83a7843507ffbae847353a08.tar.gz |
cex: also include in the report on --report=counterexamples
And let --report=all include the counterexamples.
* src/getargs.h, src/getargs.c (report_cex): New.
* src/main.c: Compute counterexamples when -rcex is specified.
* src/print.c: Include the counterexamples when -rcex is specified.
* tests/conflicts.at, tests/existing.at, tests/local.at: Adjust.
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c index e0940f3b..556bbc11 100644 --- a/src/print.c +++ b/src/print.c @@ -356,7 +356,9 @@ print_state (FILE *out, const state *s) fputc ('\n', out); fputs (s->solved_conflicts, out); } - if (warning_is_enabled (Wcounterexamples) && has_conflicts (s)) + if (has_conflicts (s) + && (report_flag & report_cex + || warning_is_enabled (Wcounterexamples))) { fputc ('\n', out); counterexample_report_state (s, out, " "); |