Landing: 6908207aa4be

Project / Subsystem

gcc / ada

Date

2026-01-21

Author

Gary Dismukes

Commit

6908207aa4bef715acd4afebc77cf1e627c244c6

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
ada
patch_id
commit_hash
6908207aa4bef715acd4afebc77cf1e627c244c6
source_type
github
headline
Fixes parsing error for generic formal functions with declare expressions
tldr
Resolves a parsing error when using declare expressions in default expressions for generic formal functions in Ada.
author
Gary Dismukes
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • ada
  • parsing
  • generic functions
  • declare expression
discussion_id_link
bugzilla_pr
date
2026-01-21T00:00:00.000Z

This commit fixes a parsing error that occurred when a generic formal function’s default expression (a GNAT extension) contained a declare expression. The compiler now correctly parses declare expressions within these default expressions by calling P_Expression_If_OK instead of P_Expression.