Landing: 5f8db9c25f05

Project / Subsystem

gcc / gccrs

Date

2026-07-06

Author

Yap Zhi Heng

Commit

5f8db9c25f054be5107d4adf679669d1d3cd5c19

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
5f8db9c25f054be5107d4adf679669d1d3cd5c19
source_type
github
headline
gccrs: Add new checks for `#[repr(align)]` attribute
tldr
Enforces that the alignment parameter in `#[repr(align)]` is a power of two.
author
Yap Zhi Heng
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • rust
  • • attribute
  • • type system
discussion_id_link
—
bugzilla_pr
—
date
2026-07-06T00:00:00.000Z

The Rust compiler frontend now includes checks for the #[repr(align)] attribute to ensure that the specified alignment value is a power of two. This is a requirement for valid alignment specifications in Rust, preventing potential misinterpretations or undefined behavior related to memory alignment.