Skip to content

Avoid confusing "__CPROVER_{r,w,rw}_ok is not declared" warning #7560

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

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

tautschnig
Copy link
Collaborator

With 4b05d48 there no longer is a (pseudo-) forward declaration available, making the C front-end warn about this built-in function not being declared. As this is polymorphic, we shouldn't be type checking it as a function in the first place, and instead should give it separate treatment as we do with other polymorphic built-ins.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

With 4b05d48 there no longer is a (pseudo-) forward declaration
available, making the C front-end warn about this built-in function not
being declared. As this is polymorphic, we shouldn't be type checking it
as a function in the first place, and instead should give it separate
treatment as we do with other polymorphic built-ins.
@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Base: 78.43% // Head: 78.50% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (bc174f3) compared to base (d7099ae).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7560      +/-   ##
===========================================
+ Coverage    78.43%   78.50%   +0.07%     
===========================================
  Files         1670     1670              
  Lines       191671   191672       +1     
===========================================
+ Hits        150331   150477     +146     
+ Misses       41340    41195     -145     
Impacted Files Coverage Δ
src/ansi-c/c_typecheck_expr.cpp 76.71% <100.00%> (+0.57%) ⬆️
src/util/bitvector_expr.h 97.41% <0.00%> (+0.46%) ⬆️
src/util/symbol_table.cpp 91.30% <0.00%> (+2.17%) ⬆️
src/util/type.h 98.68% <0.00%> (+7.89%) ⬆️
src/util/validate_helpers.h 100.00% <0.00%> (+11.11%) ⬆️
src/big-int/bigint.cc 89.00% <0.00%> (+14.26%) ⬆️
src/util/validate_expressions.cpp 93.75% <0.00%> (+15.62%) ⬆️
src/util/string_hash.cpp 45.45% <0.00%> (+18.18%) ⬆️
src/util/validate_types.cpp 93.33% <0.00%> (+56.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

1. Avoid `throw 0`
2. size_of_expr cannot fail at this point given all prior type checking.
3. Test all the failure handling.
@kroening kroening merged commit 81f1fb6 into diffblue:develop Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants