]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: VAST: create treewalker
authorBob Duff <duff@adacore.com>
Mon, 24 Mar 2025 20:21:53 +0000 (16:21 -0400)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 10 Jun 2025 07:32:06 +0000 (09:32 +0200)
commit3f30c88d17742ec2dff131c470b4ee6483d455e7
treec672a2d67b8bfcb878ff07701d83b61de25f029a
parentf2b992095a7310cbf83b15c218314dc46c675188
ada: VAST: create treewalker

Walks all trees (not just the main unit), deals with switches and
flags. Doesn't check much of anything yet (asserts that "unused" nodes
are not present).

Move decisions (what tree(s) to check, what switches enable checking)
from the caller to the body of VAST.

gcc/ada/ChangeLog:

* vast.adb: Initial implementation.
* vast.ads: Rename procedure. Remove parameter; body should decide
what to do.
* lib.ads (ipu): Minor: Rewrite comment for brevity, and because
of an inconvenient misspelling.
(Num_Units): Not used; remove.
(Remove_Unit): Minor: Remove "Currently" (which was current a decade
ago from) comment.
* lib.adb (Num_Units): Not used; remove.
* debug_a.adb (Debug_A_Entry): Fix bug: Use Write_Name_For_Debug,
so this won't crash on the Error node.
* debug.adb: Document -gnatd_V and -gnatd_W compiler switches.
* exp_ch6.adb (Validate_Subprogram_Calls): Remove redundant check for
Serious_Errors_Detected. (We turn off code gen when errors are
detected.)
* frontend.adb: Move decisions into VAST body.
* namet.ads (Present): Remove unnecessary overriding; these are
inherited by the derived types.
* namet.adb (Present): Likewise.
gcc/ada/debug.adb
gcc/ada/debug_a.adb
gcc/ada/exp_ch6.adb
gcc/ada/frontend.adb
gcc/ada/lib.adb
gcc/ada/lib.ads
gcc/ada/namet.adb
gcc/ada/namet.ads
gcc/ada/vast.adb
gcc/ada/vast.ads