aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/cpplib.h
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2025-07-22 12:34:50 -0700
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-08-04 15:04:10 +0200
commit0aebb77ced3d63ff9c37ef5ad609d47b9640ede0 (patch)
tree3ddc343771f04bd931b1cc728a9e6dd9766f7b2d /libcpp/include/cpplib.h
parentbad0a5c562991a8b1e515cd498347b314bc2e8a9 (diff)
downloadgcc-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