[Ada] Enumeration types with non-standard representation
The compiler may report errors on enumeration types with non-standard representation (i.e. at least one literal has a representation value different from its 'Pos value) processing attribute 'Enum_Rep. It may also generate wrong code for the evaluation of 'Enum_Rep raising Constraint_Error at runtime. 2018-08-21 Javier Miranda <miranda@adacore.com> gcc/ada/ * checks.ads (Determine_Range): Adding documentation. * checks.adb (Determine_Range): Don't deal with enumerated types with non-standard representation. (Convert_And_Check_Range): For conversion of enumeration types with non standard representation to an integer type perform a direct conversion to the target integer type. gcc/testsuite/ * gnat.dg/enum4.adb: New testcase. From-SVN: r263708
Showing
gcc/testsuite/gnat.dg/enum4.adb
0 → 100644
Please
register
or
sign in
to comment