Skip to content

Fatal warnings for C++2a / Clang 6.0 #1972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
karkhaz opened this issue Mar 26, 2018 · 0 comments · Fixed by #1973
Closed

Fatal warnings for C++2a / Clang 6.0 #1972

karkhaz opened this issue Mar 26, 2018 · 0 comments · Fixed by #1973

Comments

@karkhaz
Copy link
Collaborator

karkhaz commented Mar 26, 2018

Dumping various errors that happen when trying to build cprover with Clang 6.0, which has experimental support for C++2a and gives off many new warnings.

/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_fi.cpp:744:9: error: parentheses were disambiguated as redundant parentheses around declaration of variable named 'it' [-Werror,-Wvexing-parse]
        forall_objects(it, omt.read())
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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;
                                   ^
karkhaz added a commit to karkhaz/cbmc that referenced this issue Mar 26, 2018
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants