-
Notifications
You must be signed in to change notification settings - Fork 74
Remove -Csoft-float #971
Copy link
Copy link
Closed
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted
Metadata
Metadata
Assignees
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.