https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124163
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > Thanks, but I have not yet fully understood: Do you mean to say that > performing Float'Succ(Pi) with infinite precision (as it is a static > expression) should mean to add an infinitely small increment? No, 'Succ is *not* about incrementing anything, it's about returning the machine number immediately above the input, which is Ada.Numerics.Pi with "infinite" precision since it's a named number, see RM 3.5(24). > As I understand it, the following are also static expressions (because they > are using named numbers and constants initialized from static expressions: > > Const_Float_Pi : constant Float := Pi; > Const_Succ_Pi : constant Float := Float'Succ(Const_Float_Pi); Yes, they are, but they have type Float unlike Ada.Numerics.Pi, so there is an implicit Float'Machine applied to their initialization expression, see RM 4.9(38/2). > Following that reasoning, here, also, Float'Succ(Const_Float_Pi) would have > to be performed with infinite precision. Yes, but the input has type Float already, unlike Ada.Numerics.Pi.
