Skip to content

Commit

Permalink
Reorganise the release-dependent parts of common/.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
simonjwright committed Oct 11, 2022
1 parent 9fa6a83 commit 818a47a
Show file tree
Hide file tree
Showing 170 changed files with 6,778 additions and 9,990 deletions.
15 changes: 14 additions & 1 deletion common/common.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ abstract project Common is
type Compiler_Release is
("gcc6", "gnat-gpl-2017", "gcc7", "gcc8", "gnat-ce-2020",
"gcc11", "gcc12");

-- We need to cope with changes to tasking and tag code between
-- compiler releases.
Release : Compiler_Release := external ("RELEASE", "gcc11");
Release_Path := Release;
case Release is
Expand All @@ -29,12 +32,22 @@ abstract project Common is
when others =>
null;
end case;
-- We also need to cope with the Ada2022 changes to 'Image code
-- and the new aggregate syntax, which is the same up to GCC12.
Image_Path := "";
case Release is
when "gcc12" =>
Image_Path := "post-gcc12";
when others =>
Image_Path := "pre-gcc12";
end case;

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

Paths := (project'Project_Dir,
project'Project_Dir & "math",
project'Project_Dir & Release_Path);
project'Project_Dir & Release_Path,
project'Project_Dir & Image_Path);

end Common;
45 changes: 0 additions & 45 deletions common/gcc7/s-imgboo.ads

This file was deleted.

111 changes: 0 additions & 111 deletions common/gcc7/s-imgint.adb

This file was deleted.

57 changes: 0 additions & 57 deletions common/gcc7/s-imgint.ads

This file was deleted.

110 changes: 0 additions & 110 deletions common/gcc7/s-imglli.adb

This file was deleted.

Loading

0 comments on commit 818a47a

Please sign in to comment.