Landing: 811cc466193d

Project / Subsystem

gcc / c++

Date

2026-05-19

Author

Marek Polacek

Commit

811cc466193d7efcfcc07d2081b1284d97fc91a1

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
commit_hash
811cc466193d7efcfcc07d2081b1284d97fc91a1
source_type
github
headline
C++ frontend improves alias recognition with lambda template arguments
tldr
GCC's C++ frontend now more efficiently recognizes aliases involving lambda template arguments, leading to minor compilation speed improvements.
author
Marek Polacek
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • frontend
  • performance
  • templates
  • lambdas
discussion_id_link
bugzilla_pr
date
2026-05-19T00:00:00.000Z

This commit enhances the GCC C++ frontend’s ability to recognize dependencies when lambda expressions are used as template arguments. A new flag, TYPE_DECL_OPAQUE_ALIAS_P, is introduced to mark declarations, avoiding expensive tree traversals in dependent_opaque_alias_p. This optimization specifically targets deeply nested lambdas, which previously fooled the alias detection logic. The change yields a marginal but measurable improvement in compilation time, particularly for complex C++ codebases like range-v3.