]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Add utility to preanalyze assert expression without forcing its type
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 10 Jan 2022 23:28:00 +0000 (00:28 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 9 May 2022 09:27:31 +0000 (09:27 +0000)
commit2fe776e2d346bcf450f40739825249cab449e567
tree513f665e8c7bc007e2b35c2fb58f48fc22e3aecb
parenteb05097d5508618a70b279df6d10d409eb4c60ae
[Ada] Add utility to preanalyze assert expression without forcing its type

In SPARK loop and subprogram variants we now allow expressions of any
discrete type or of Ada.Numerics.Big_Numbers.Big_Integers.Big_Integer
type. This requires a variant of Preanalyze_Assert_Expression that
doesn't force the expression to be of a particular type, similar to the
existing variant of Analyze_And_Resolve.

gcc/ada/

* sem_ch3.ads, sem_ch3.adb (Preanalyze_Assert_Expression): Add a
variant that doesn't force preanalysis to yield a specific type.
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch3.ads