forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warnings emitted by C++2a compiler
This commit fixes diffblue#1972, in particular fixing these three classes of error that occurred over various files in the codebase: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: error: destructor called on non-final 'java_bytecode_parse_treet::methodt' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor] destroy(_Up* __p) { __p->~_Up(); } ^ cbmc/src/pointer-analysis/value_set_fivr.cpp:857:9: error: parentheses were disambiguated as redundant parentheses around declaration of variable named 'it' [-Werror,-Wvexing-parse] forall_objects(it, omt.read()) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cbmc/src/cpp/cpp_typecheck_resolve.cpp:591:34: error: unused variable 'next' [-Werror,-Wunused-variable] resolve_identifierst::iterator next; ^ These warnings are emitted when building with Clang 6.0 with the default flags. As of this commit, one warning remains, which can be suppressed by building with the flag -Wno-c++2a-compat until we have a proper fix.
- Loading branch information
Showing
6 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ Author: Daniel Kroening, [email protected] | |
class java_bytecode_parse_treet | ||
{ | ||
public: | ||
virtual ~java_bytecode_parse_treet() = default; | ||
class annotationt | ||
{ | ||
public: | ||
|
@@ -157,11 +158,14 @@ class java_bytecode_parse_treet | |
is_synchronized(false) | ||
{ | ||
} | ||
|
||
virtual ~methodt() = default; | ||
}; | ||
|
||
class fieldt:public membert | ||
{ | ||
public: | ||
virtual ~fieldt() = default; | ||
virtual void output(std::ostream &out) const; | ||
bool is_enum; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters