DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B0903: obsolescent library unit name

Catalog status: active. Default severity: error. Stable name: obsolescent-library-name. Family: Syntax and source text.

Ada 83's library units Text_IO, Unchecked_Conversion, Unchecked_Deallocation, Sequential_IO, Direct_IO, IO_Exceptions and Calendar are now children of Ada; the old names survive only as renamings in Annex J.1. Verada reads the old name as the new unit, reports it and offers the fix. The package ASCII (Annex J.5) is likewise an old name for the characters of Ada.Characters.Latin_1: Verada reports ASCII.X and offers Latin_1's name for X (ASCII.Sharp is Ada.Characters.Latin_1.Number_Sign), with the with clause it needs.

SPARK's names for units Verada takes from Ada are reported the same way: SPARK.Big_Integers is Ada.Numerics.Big_Numbers.Big_Integers, and GNAT's formal containers, SPARK.Containers.Formal.Vectors (or Ada.Containers.Formal_Vectors) and the lists, maps and sets beside it, are Ada's bounded containers, Ada.Containers.Bounded_Vectors and the rest. SPARK's names for what Verada has under its own are reported too: SPARK.Big_Reals is Ada.Numerics.Big_Numbers.Big_Reals, SPARK.Containers.Formal.Unbounded_Vectors is Verada.Containers.Unbounded.Vectors, SPARK.Containers.Functional.Maps, Sets and Vectors are Verada.Containers.Functional.Maps, Sets and Sequences, and SPARK.Lemmas.Integer_Arithmetic is Verada.Lemmas.Arithmetic. Ada.Characters.Handling's conversions of Annex J.14 (Is_Character, Is_String, To_Character, To_String, To_Wide_Character, To_Wide_String) are reported with their names in Ada.Characters.Conversions, whether written in full or through a use clause of Handling.

Example (Vada)

with Text_IO;
...
   Text_IO.Put (ASCII.LC_A);

What to do

with Ada.Text_IO;
with Ada.Characters.Latin_1;
...
   Ada.Text_IO.Put (Ada.Characters.Latin_1.LC_A);

Regression source and further reading

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

See syntax and source text, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.