Skip to content

Commit

Permalink
Add a test regular variadic functions errors
Browse files Browse the repository at this point in the history
Add a new regression test for the error message in regular function
variadic errors during ast validation pass.

gcc/testsuite/ChangeLog:

	* rust/compile/non_foreign_variadic_function.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
  • Loading branch information
P-E-P committed Nov 21, 2023
1 parent 33965b8 commit 0f9752e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gcc/testsuite/rust/compile/non_foreign_variadic_function.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub fn toto(a: i32, ...) {}
// { dg-error "only foreign or .unsafe extern .C.. functions may be C-variadic" "" { target *-*-* } .-1 }

fn main() {}

0 comments on commit 0f9752e

Please sign in to comment.