rust/tests/ui/sse-abi-checks.stderr
Luca Versari 5af56cac38 Emit error when calling/declaring functions with unavailable vectors.
On some architectures, vector types may have a different ABI when
relevant target features are enabled.

As discussed in https://github.com/rust-lang/lang-team/issues/235, this
turns out to very easily lead to unsound code.

This commit makes it an error to declare or call functions using those
vector types in a context in which the corresponding target features are
disabled, if using an ABI for which the difference is relevant.
2024-10-25 08:46:40 +02:00

14 lines
728 B
Plaintext

warning: ABI error: this function definition uses a vector type that requires the `sse` target feature, which is not enabled
--> $DIR/sse-abi-checks.rs:21:1
|
LL | pub unsafe extern "C" fn f(_: SseVector) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
= help: consider enabling it globally (`-C target-feature=+sse`) or locally (`#[target_feature(enable="sse")]`)
= note: `#[warn(abi_unsupported_vector_types)]` on by default
warning: 1 warning emitted