Skip to content

Commit 818a47a

Browse files
committed
Reorganise the release-dependent parts of common/.
The previous solution (dba65e4) splattered Image-related units into every release subdirectory; all were the same until GCC12. The revised solution moves the GCC12-related units into common/post-gcc12, the others into pre-gcc12. Issue #40 (GNAT deciding that parens for aggregates are obsolescent in spite of not being in Annex J, and issuing warnings with -gnatwa) is addressed by moving the Container units into these subdirectories and editing the ones in post-gcc12/ to use [brackets] rather than (parentheses). * common/common.gpr (Image_Path): new, chooses post-gcc12 or pre-gcc12. (Paths): include Image_Path. * common/post-gcc12/a-chtgbo.adb: use brackets in aggregates. * common/post-gcc12/a-cobove.adb: likewise. * common/post-gcc12/a-cohata.ads: likewise.
1 parent 9fa6a83 commit 818a47a

File tree

170 files changed

+6778
-9990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+6778
-9990
lines changed

common/common.gpr

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ abstract project Common is
2121
type Compiler_Release is
2222
("gcc6", "gnat-gpl-2017", "gcc7", "gcc8", "gnat-ce-2020",
2323
"gcc11", "gcc12");
24+
25+
-- We need to cope with changes to tasking and tag code between
26+
-- compiler releases.
2427
Release : Compiler_Release := external ("RELEASE", "gcc11");
2528
Release_Path := Release;
2629
case Release is
@@ -29,12 +32,22 @@ abstract project Common is
2932
when others =>
3033
null;
3134
end case;
35+
-- We also need to cope with the Ada2022 changes to 'Image code
36+
-- and the new aggregate syntax, which is the same up to GCC12.
37+
Image_Path := "";
38+
case Release is
39+
when "gcc12" =>
40+
Image_Path := "post-gcc12";
41+
when others =>
42+
Image_Path := "pre-gcc12";
43+
end case;
3244

3345
type Install_Locally is ("yes", "no");
3446
Local : Install_Locally := external ("INSTALL_LOCALLY", "yes");
3547

3648
Paths := (project'Project_Dir,
3749
project'Project_Dir & "math",
38-
project'Project_Dir & Release_Path);
50+
project'Project_Dir & Release_Path,
51+
project'Project_Dir & Image_Path);
3952

4053
end Common;

common/gcc7/s-imgboo.ads

Lines changed: 0 additions & 45 deletions
This file was deleted.

common/gcc7/s-imgint.adb

Lines changed: 0 additions & 111 deletions
This file was deleted.

common/gcc7/s-imgint.ads

Lines changed: 0 additions & 57 deletions
This file was deleted.

common/gcc7/s-imglli.adb

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)