GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Ada: Remove exception handling from aspects.

The Ada compiler removes exception handling related to aspects, simplifying the code.

The Ada compiler removes the Aspect_Exit exception and related code from sem_ch13.adb. The use of exceptions was deemed unnecessary and hindered future refactoring efforts. Inlining code from Check_Expr_Is_OK_Static_Expression also reduces complexity.

In Details

This commit modifies sem_ch13.adb by removing the Aspect_Exit exception and associated handling logic within the Analyze_One_Aspect function. Exception handling in this context was used to manage errors encountered during aspect analysis. By inlining the code from Check_Expr_Is_OK_Static_Expression, the commit simplifies the control flow and reduces the overhead associated with exception handling.

For Context

Exception handling is a mechanism used to manage errors that occur during program execution. In the context of a compiler, exception handling might be used to deal with errors encountered while processing source code. This commit removes exception handling from a specific part of the Ada compiler related to aspects. Aspects in Ada provide a way to add extra information or modify the behavior of program entities.

Filed Under: adacompilerexception handling