aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-23 08:13:15 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-23 08:13:15 +0000
commitc910db716273c381b4e2f36f3d04c6e480876b63 (patch)
tree3803b6f751ba27d3ba2f891617dad7aa5a6fcd4d /gcc/bitmap.c
parent15e79d66f00317d3acbfa1c93c9460a65174454b (diff)
downloadgcc-c910db716273c381b4e2f36f3d04c6e480876b63.zip
gcc-c910db716273c381b4e2f36f3d04c6e480876b63.tar.gz
gcc-c910db716273c381b4e2f36f3d04c6e480876b63.tar.bz2
[Ada] Iterators are view-specific
Operational aspects, such as Default_Iterator, are view-specific, and if such an aspect appears on the full view of a private type, an object of the type cannot be iterated upon if it is not in the scope of the full view, This patch diagnoses properly an attempt to iterate over such an object. 2019-07-23 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * aspects.ads: New table Operational_Aspect, used to distinguish between aspects that are view-specific, such as those related to iterators, and representation aspects that apply to all views of a type. * aspects.adb (Find_Aspect): If the aspect being sought is operational, do not ecamine the full view of a private type to retrieve it. * sem_ch5.adb (Analyze_Iterator_Specification): Improve error message when the intended domain of iteration does not implement the required iterator aspects. gcc/testsuite/ * gnat.dg/iter5.adb: Add an expected error. * gnat.dg/iter6.adb: New testcase. From-SVN: r273722
Diffstat (limited to 'gcc/bitmap.c')
0 files changed, 0 insertions, 0 deletions