File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ // FIXME(workingjubilee): add revisions and generalize to other platform-specific varargs ABIs,
2
+ // preferably after the only-arch directive is enhanced with an "or pattern" syntax
3
+ //@ only-x86_64
4
+ //@ build-pass
5
+
6
+ #![ feature( extended_varargs_abi_support) ]
7
+
8
+ // sometimes fn ptrs with varargs make layout and ABI computation ICE
9
+ // as found in https://github.com/rust-lang/rust/issues/142107
10
+
11
+ fn aapcs ( f : extern "aapcs" fn ( usize , ...) ) {
12
+ //~^ warning: the calling convention "aapcs" is not supported on this target
13
+ //~| warning: this was previously accepted by the compiler but is being phased out
14
+ f ( 22 , 44 ) ;
15
+ }
16
+
17
+
18
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ warning: the calling convention "aapcs" is not supported on this target
2
+ --> $DIR/unsupported-varargs-fnptr.rs:7:13
3
+ |
4
+ LL | fn aapcs(f: extern "aapcs" fn(usize, ...)) {
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
+ = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
9
+ = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
10
+
11
+ warning: 1 warning emitted
12
+
13
+ Future incompatibility report: Future breakage diagnostic:
14
+ warning: the calling convention "aapcs" is not supported on this target
15
+ --> $DIR/unsupported-varargs-fnptr.rs:7:13
16
+ |
17
+ LL | fn aapcs(f: extern "aapcs" fn(usize, ...)) {
18
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
+ |
20
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21
+ = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
22
+ = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
23
+
You can’t perform that action at this time.
0 commit comments