Landing: 9aaedeaced05
Project / Subsystem
gcc / gcc
Date
2026-04-26
Author
Martin Uecker
Commit
9aaedeaced055efe5041004e0643f4f3127c6ce9
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- 9aaedeaced055efe5041004e0643f4f3127c6ce9
- source_type
- github
- headline
- C: Argument expressions may be evaluated too often by typeof.
- tldr
- Fixes a bug where argument expressions within `typeof` were evaluated multiple times.
- author
- Martin Uecker
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c
- • typeof
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-04-26T00:00:00.000Z
When using typeof with multiple declarators in a declaration, argument expressions within typeof could be evaluated multiple times. This commit fixes the issue by adding a save_expr, which ensures that the expression is evaluated only once. This prevents unexpected side effects and ensures the program behaves as intended.