DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B8004: SPARK_Mode => Off has no effect

Catalog status: active. Default severity: warning. Stable name: spark-mode-off. Family: Warnings and assumptions.

Verada proves every unit it compiles; there is no part of a program it leaves unproved. The SPARK_Mode aspect and pragma (as a configuration pragma, a declaration or a statement) are accepted so that code shared with SPARK tools reads the same: On changes nothing, and Off is reported because it would suggest that the code is not proved.

The command and mode still determine whether proof runs. check performs language and flow analysis without proof; build --no-prove skips proof globally. Neither behavior is selected by SPARK_Mode.

Example (Vada)

   procedure Report (D : Drawing) with SPARK_Mode => Off is

Example (Varc)

    fn report(d: Drawing) @SPARK_Mode(Off) {

What to do

Remove the setting, or write On in source shared with SPARK tools. If another tool needs Off (GNATprove cannot analyse some constructs), keep it and accept the warning. Code that Verada should not prove belongs outside the program, imported with a contract. See aspects and pragmas.

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See warnings and assumptions, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.