Warnings reported in CI by GCC 14.2.1 on Ubuntu, but not locally on
macOS.
* src/descriptors-field.adb:
descriptors-field.adb:302:19: warning: "Addition" is not modified
descriptors-field.adb:303:19: warning: "Index" is not modified
descriptors-field.adb:304:19: warning: "LSB" is not modified
descriptors-field.adb:305:19: warning: "MSB" is not modified
descriptors-field.adb:310:25: warning: "Percent_S" is not modified
descriptors-field.adb:313:25: (style) "exit Substitute" required
descriptors-field.adb:372:07: warning: "Full_Fields" is not modified
From the SVD, field components have an optional <dimElementGroup>:
<dim> specifies the number of array elements,
<dimIncrement> specifies the address (?bit) offset between consecutive
array elements,
(optional) <dimIndex> specifies "a comma seperated list of
strings being used for identifying each element in the array",
but we only see r'[0-9]+\-[0-9]+'.
We will produce <dim> fields, where %s in the Name translates to the
first component of <dimIndex> incremented by 1 for each field, and
LSB, MSB are incremented by <dimIncrement>.
* src/descriptors-field.ads
(Field_T): added components
Dimensions: contents of the <dim> field in the SVD,
Increment: contents of the <dimIncrement> field in the SVD,
Index: the first component of the <dimIndex> field in the SVD.
(Null_Field): added values for the new components, using associations.
* src/descriptors-field.adb:
(context): with Ada.Strings.Fixed, so we can pick out which Trim is
required.
(Read_Field): initialize new fields in Result. In particular, Dimensions
will be set to 1. If present, process tags dim, dimIncrement, dimIndex.
(Dump): add new function Insert_Dimensioned_Fields. Call this function
on the input Reg_Fields, and then run the rest of Dump on the result.
(Insert_Dimensioned_Fields): new. For each Field in the original, insert
as many copies as indicated by its Dimensions, updating the Name, LSB
and MSB. Note that if the original field from the SVD had no <dim>
component, Dimensions will have been set to 1 by Read_Field, so this
process will be done just once (resulting in no change).
This warning (treated as error) causes build failure in CI on at least
Ubuntu.
* src/ada_gen.adb (Get_Boolean): rename Dead, Dead2 to Dummy, Dummy2,
so GNAT won't report unused warnings.