Landing: b4ee289b9cb1

Project / Subsystem

gcc / ada

Date

2026-05-18

Author

Eric Botcazou

Commit

b4ee289b9cb171e279fd44e9978e83e347cdced2

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
ada
patch_id
commit_hash
b4ee289b9cb171e279fd44e9978e83e347cdced2
source_type
github
headline
Ada return objects now recognize local anonymous access types
tldr
GCC's Ada compiler now correctly flags the anonymous access types of return objects as local, aligning with Ada 2012 rules for preventing standalone objects.
author
Eric Botcazou
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • ada
  • language-semantics
  • ada-2012
discussion_id_link
bugzilla_pr
date
2026-05-18T00:00:00.000Z

The Ada front end in GCC has been updated to set the Is_Local_Anonymous_Access flag on the anonymous access type of return objects. This change ensures that return objects are correctly identified as local, preventing them from being mistakenly treated as Ada 2012 standalone objects. This adjustment helps enforce the Ada Reference Manual’s rule 3.10.2(13.2), improving compliance and preventing potential issues with lifetime management.