You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gccrs: Implement compilation of #[repr(transparent)] structs
gcc/rust/ChangeLog:
* backend/rust-compile-expr.h (CompileExpr::compile_transparent_field_access): New
helper function.
* backend/rust-compile-expr.cc (CompileExpr::compile_transparent_field_access):
Implement helper function for accessing the field of #[repr(transparent)] ADTs.
(CompileExpr::visit (HIR::StructExprStructFields)): Support struct field construction
properly for #[repr(transparent)] structs.
(CompileExpr::visit (HIR::FieldAccessExpr)): Implement proper compilation of field
access for #[repr(transparent)] ADTs.
* backend/rust-compile-type.cc (TyTyResolveCompile::visit (TyTy::ADTType)): Implement
proper compilation of typing for #[repr(transparent)] ADTs.
gcc/testsuite/ChangeLog:
* rust/execute/torture/c_string.rs: Fix missing #[repr(transparent)]
* rust/execute/torture/c_string_ensure_null_term.rs: Ditto.
* rust/compile/c_string_null_byte_check.rs: Ditto.
Signed-Off-By: Yap Zhi Heng <yapzhhg@gmail.com>
0 commit comments