Landing: 151ded854245

Project / Subsystem

gcc / gcc/cp

Date

2026-07-26

Author

Odysseas Georgoudis

Commit

151ded854245c1578706a9da4843f17f55de33d0

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/cp
patch_id
—
commit_hash
151ded854245c1578706a9da4843f17f55de33d0
source_type
github
headline
c++: Avoid access check for dependent lookup results [PR124983]
tldr
C++ template lookup now correctly skips access checks on dependent scope members.
author
Odysseas Georgoudis
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • templates
  • • compiler-error
  • • lookup
discussion_id_link
—
bugzilla_pr
—
date
2026-07-26T00:00:00.000Z

GCC’s template parsing has been improved to avoid performing access checks on members found within dependent scopes during dependent lookup. Previously, the strip_using_decl transformation could convert a USING_DECL to a TYPE_DECL, leading lookup_member to incorrectly attempt an access check on a dependent type. This commit modifies lookup_member to skip access checks when the lookup result originates from a dependent scope, aligning with template instantiation rules and fixing PR124983.