]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ada/ChangeLog
[Ada] More permissive use of GNAT attribute Enum_Rep
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Jul 2019 13:37:37 +0000 (13:37 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Jul 2019 13:37:37 +0000 (13:37 +0000)
commitfc8ae4965c169b4754aaa042d2efa9e0a5f86baf
tree323960aced50decdff1836f6ea1433a9e077e220
parent9d27ea41321ace104306366bbb9289bbbde15b85
[Ada] More permissive use of GNAT attribute Enum_Rep

This patch allows the prefix of the attribute Enum_Rep to be an
attribute referece (such as Enum_Type'First). A recent patch had
restricted the prefix to be an object of a discrete type, which is
incompatible with orevious usage.

2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
of attribute to be an attribute reference of a discrete type.

gcc/testsuite/

* gnat.dg/enum_rep.adb, gnat.dg/enum_rep.ads: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272881 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/sem_attr.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/enum_rep.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/enum_rep.ads [new file with mode: 0644]