[Ada] Add an annotation for static analysis
authorArnaud Charlet <charlet@adacore.com>
Wed, 10 Jul 2019 09:02:08 +0000 (09:02 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 10 Jul 2019 09:02:08 +0000 (09:02 +0000)
2019-07-10  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.

From-SVN: r273342

gcc/ada/ChangeLog
gcc/ada/sfn_scan.adb

index 4db8abc5fa2559fd1a9e1616c76d01bb877ec1b8..f99b6db923cc2ddb2cddcb65d298a67c426bed24 100644 (file)
@@ -1,3 +1,7 @@
+2019-07-10  Arnaud Charlet  <charlet@adacore.com>
+
+       * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
+
 2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
index 66e9a82433bd995a01632b60ea7d84f5a8b3a050..377ea19fa33cc82f1c4e7aad0d6707e6b1dddd8d 100644 (file)
@@ -607,6 +607,7 @@ package body SFN_Scan is
 
    exception
       when others =>
+         pragma Assert (P'Valid);
          Cursor := P - S'First + 1;
          raise;
    end Scan_SFN_Pragmas;