Fix compile errors related to free variables #101
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes compile errors that occurred in the Olden and Ptrdist benchmarks due to the changes in checkedc-clang/#903. The checkedc-clang PR detects free variables in declared and inferred bounds and emits a compiler error if free variables are found.
This PR changes some declared bounds and reorders some code so that no free variables are involved in declared and inferred bounds. In particular:
totalSCC
array pointer. in vcg.h usechannelNets
rather thantotalSCC
in the declared bounds (totalSCC
is allocated usingchannelNets
).SCCofVCG
method in vcg.c accepts an additional parameter for the length of theperSCC
array pointer. Many functions in vcg.c reference global variables in parameter bounds. Continuing to clean up these global references is a future work item Remove uses of global variables in parameter bounds #100.GetPhrase
method in anagram.c references the parameterpch
rather than the globalachPhrase
in its declared bounds.