Landing: 9971faf312bf
Project / Subsystem
gcc / c++
Date
2026-09-04
Author
Lunex
Commit
9971faf312bfa502d8c983b528f80e4538cfefaf
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++
- patch_id
- —
- commit_hash
- 9971faf312bfa502d8c983b528f80e4538cfefaf
- source_type
- github
- headline
- c++: Reject friend declarations with explicit object parameters
- tldr
- Prevents compilation of invalid friend declarations that misuse explicit object parameters, avoiding crashes.
- author
- Lunex
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • friend
- • compile-error
- • security
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-04T00:00:00.000Z
GCC now correctly rejects friend declarations that attempt to use explicit object parameters, a feature intended only for member functions. Previously, the compiler allowed such declarations, leading to internal errors and crashes later in the compilation process due to incorrect access checks. This fix ensures that only member functions can employ explicit object parameters, improving the robustness of C++ parsing and access control.