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
The -Csoft-float flag has been added in pre-1.0 times (rust-lang/rust#9617) without much discussion, probably with the intent to mirror -msoft-float in C compilers. It never properly mirrored clang though because it only affected the LLVM float ABI setting, not the "soft-float" target feature (the clang flag sets both). It is also blatantly unsound because it affects how float arguments are passed (rust-lang/rust#129893), making it UB to invoke parts of the standard library.
The flag got deprecated with Rust 1.83 (released November 2024), and in the year since then, nobody spoke up in rust-lang/rust#129893 to have it preserved. I think it is time to remove it. I can totally imagine us bringing back a similar flag, properly registered as a target modifier to preserve soundness, but that should come with a coherent design that works for more than one architecture (the flag only does anything on ARM).
I assume this will need an FCP since it is a breaking change.
So far we apparently often turned removed flags into such warnings, OTOH doing this for an ABI-affecting flag seems like a potentially bad idea. Therefore, we'll turn usage of this flag into a hard error.
Proposal
The
-Csoft-floatflag has been added in pre-1.0 times (rust-lang/rust#9617) without much discussion, probably with the intent to mirror-msoft-floatin C compilers. It never properly mirrored clang though because it only affected the LLVM float ABI setting, not the "soft-float" target feature (the clang flag sets both). It is also blatantly unsound because it affects how float arguments are passed (rust-lang/rust#129893), making it UB to invoke parts of the standard library.The flag got deprecated with Rust 1.83 (released November 2024), and in the year since then, nobody spoke up in rust-lang/rust#129893 to have it preserved. I think it is time to remove it. I can totally imagine us bringing back a similar flag, properly registered as a target modifier to preserve soundness, but that should come with a coherent design that works for more than one architecture (the flag only does anything on ARM).
I assume this will need an FCP since it is a breaking change.
So far we apparently often turned removed flags into such warnings, OTOH doing this for an ABI-affecting flag seems like a potentially bad idea. Therefore, we'll turn usage of this flag into a hard error.
Mentors or Reviewers
Implementation already available at rust-lang/rust#152973
Process
The main points of the Major Change Process are as follows:
@rustbot secondor kickoff a team FCP with@rfcbot fcp $RESOLUTION.You can read more about Major Change Proposals on forge.
Note
Concerns (0 active)
error-or-ignoreresolved in this commentManaged by
@rustbot—see help for details.