diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-11-18 12:28:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-18 12:28:54 -0800 |
commit | 17f0468c1656aa91d7cc5e3174a797312a9364c3 (patch) | |
tree | 0c765c27541a3d0eed0e10b2afc49613e5c719ef /src/proof | |
parent | 6fe7877d82721e453d5d928a8fe9dbad2099dac1 (diff) |
Use -Wimplicit-fallthrough (#3464)
This commit enables compiler warnings for implicit fallthroughs in
switch statements that are not explicitly marked as such. The commit
introduces a new macro `CVC4_FALLTHROUGH` that can be used to indicate
that a fallthrough is intentional. The commit fixes existing warnings
and a bug in the arithmetic rewriter for `abs` (the bug likely couldn't
be triggered easily because we rewrite `abs` to an `ite` while expanding
definitions).
To have the new macro also available in the parser, the commit changes
`src/base/check.h` to be visible to the parser (it includes
`cvc4_private_library.h` now instead of `cvc4_private.h`).
Diffstat (limited to 'src/proof')
-rw-r--r-- | src/proof/theory_proof.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proof/theory_proof.cpp b/src/proof/theory_proof.cpp index 1f3e6abf1..8b9204a20 100644 --- a/src/proof/theory_proof.cpp +++ b/src/proof/theory_proof.cpp @@ -1186,7 +1186,7 @@ void LFSCBooleanProof::printOwnedTerm(Expr term, std::ostream& os, const ProofLe } // If letification is off or there were 2 children, same treatment as the other cases. - // (No break is intentional). + CVC4_FALLTHROUGH; case kind::XOR: case kind::IMPLIES: case kind::NOT: |