diff options
author | Steve Baird <baird@adacore.com> | 2025-07-22 12:34:50 -0700 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-08-04 15:04:10 +0200 |
commit | 0aebb77ced3d63ff9c37ef5ad609d47b9640ede0 (patch) | |
tree | 3ddc343771f04bd931b1cc728a9e6dd9766f7b2d /libcpp/include/cpplib.h | |
parent | bad0a5c562991a8b1e515cd498347b314bc2e8a9 (diff) | |
download | gcc-0aebb77ced3d63ff9c37ef5ad609d47b9640ede0.zip gcc-0aebb77ced3d63ff9c37ef5ad609d47b9640ede0.tar.gz gcc-0aebb77ced3d63ff9c37ef5ad609d47b9640ede0.tar.bz2 |
ada: Implement accessibility legality check for discriminated function result.
If a function result type has an access discriminant, then we already
generate a run-time accessibility check for a return statement. But if
we know statically that the check (if executed) is going to fail, then
that should be rejected at compile-time as a violation of RM 6.5(5.9).
Add this additional compile-time check.
gcc/ada/ChangeLog:
* exp_ch6.adb (Apply_Access_Discrims_Accessibility_Check): If the
accessibility level being checked is known statically, then
statically check it against the level of the function being
returned from.
Diffstat (limited to 'libcpp/include/cpplib.h')
0 files changed, 0 insertions, 0 deletions