Landing: 39ba948f9b86

Project / Subsystem

gcc / c-family

Date

2026-08-26

Author

Sammy Al Hashemi

Commit

39ba948f9b86e136395b6edfe167ac7ba7232928

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c-family
patch_id
—
commit_hash
39ba948f9b86e136395b6edfe167ac7ba7232928
source_type
github
headline
Honor -Wstrict-aliasing explicitly, even with -fno-strict-aliasing.
tldr
C-family front-end warns about strict aliasing violations when explicitly requested, regardless of -fno-strict-aliasing.
author
Sammy Al Hashemi
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c
  • • warning
  • • aliasing
discussion_id_link
—
bugzilla_pr
—
date
2026-08-26T00:00:00.000Z

The C-family front-end now correctly honors an explicit -Wstrict-aliasing warning flag, even when -fno-strict-aliasing is also enabled. Previously, -fno-strict-aliasing would unconditionally silence this warning. This change ensures that users who explicitly request strict aliasing checks receive them, as the front-end’s type-based check does not require optimization to be active. The back-end’s more complex flow-sensitive checks are still subject to optimization flags.