diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2022-09-26 12:51:41 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-10-06 11:22:47 +0200 |
commit | 86b786dc7295f6288296abb38d05572c3f98a758 (patch) | |
tree | ac105994611f5e12d49c7e168edc1381f64cd28f /gcc/cp/parser.cc | |
parent | ed7278d98e4727a7def30ab91fcef4658e34baa4 (diff) | |
download | gcc-86b786dc7295f6288296abb38d05572c3f98a758.zip gcc-86b786dc7295f6288296abb38d05572c3f98a758.tar.gz gcc-86b786dc7295f6288296abb38d05572c3f98a758.tar.bz2 |
ada: Fix spurious warning on unreferenced refinement constituents
Listing an object as a state refinement constituent shouldn't be
considered to be a reference, at least from the point of view of the
machinery for detecting objects that are never referenced or written
without being referenced.
This patch fixes a spurious warning that rarely occurred in practice but
was annoyingly emitted for minimal reproducers for issues related to
state abstractions.
Note: there are other pragmas that should be similarly recognized (e.g.
Depends, Global and their refined variants), but recognizing them
efficiently probably requires a dedicated utility routine (i.e. to avoid
traversal of the parent chain for every kind of pragma).
gcc/ada/
* sem_prag.adb
(Sig_Pragma): Change flag for pragma Refined_State to mean "not
significant"; this is primarily for documentation, because the
exact value of the flag is not really taken into account for
Refined_State.
(Is_Non_Significant_Pragma_Reference): Add special handling for
pragma Refined_State.
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions