forked from Rust-GCC/gccrs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gccrs: [E0045] Variadic Parameters Used on Non-C ABI Function
Added error code support for using variadic parameters used on Non-C ABI function. Fixes Rust-GCC#2382 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit): Added check for error code support. gcc/testsuite/ChangeLog: * rust/compile/abi-vardaic.rs: New test. Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
- Loading branch information
1 parent
5141707
commit da58dc1
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// https://doc.rust-lang.org/error_codes/E0045.html | ||
#![allow(unused)] | ||
fn main() { | ||
extern "Rust" { | ||
fn foo(x: u8, ...); // { dg-error "C-variadic function must have C or cdecl calling convention" } | ||
} | ||
} |