https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118027
Bug ID: 118027
Summary: Real_Literal ans Integer_Literal aspects do not work
for literals beginning with a sign
Product: gcc
Version: 14.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: liam at liampwll dot com
CC: dkm at gcc dot gnu.org
Target Milestone: ---
As shown in the below code and error message, literals with signs are not
correctly handled. This bug is present in all versions since 11 where the
aspects were introduced.
type T is null record with Integer_Literal => F;
function F (Value : String) return T is (null record);
A : T := 1;
B : T := -1;
C : T := +1;
example.adb:7:13: error: expected type "T" defined at line 4
example.adb:7:13: error: found type universal integer
example.adb:8:13: error: expected type "T" defined at line 4
example.adb:8:13: error: found type universal integer