Enable checks during analysis of expanded dispatching calls.
This commit re-enables run-time checks during the expansion of dispatching calls in Ada.
This commit re-enables the generation of run-time checks during the analysis and resolution of expanded dispatching calls. These checks were previously disabled to avoid spurious warnings under the ZFP run-time, but this is no longer necessary. This change ensures that potential errors in dispatching calls are detected at run-time, improving the reliability of Ada programs.
In Details
The Ada compiler performs run-time checks to ensure the safety and correctness of dispatching calls (calls to subprograms through a class-wide type). These checks were previously suppressed in exp_disp.adb due to issues with the ZFP run-time. This commit removes that suppression, re-enabling the checks and improving the robustness of the generated code. This change affects the expansion and analysis of dispatching calls within the Ada front end.
For Context
Dispatching calls in Ada are a mechanism for calling the correct subprogram based on the actual type of an object at run-time, similar to virtual functions in C++. To ensure safety, the Ada run-time system performs checks during these calls to prevent errors. This commit re-enables these checks in the Ada compiler, ensuring more robust and reliable program execution by catching potential issues with dispatching calls.