public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8546] gccrs: Add a test regular variadic functions errors
@ 2024-01-30 11:58 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 11:58 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:4f45c715b83b91fe3c5a326a3474c7cebeefc09f
commit r14-8546-g4f45c715b83b91fe3c5a326a3474c7cebeefc09f
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Mon Nov 20 11:37:12 2023 +0100
gccrs: Add a test regular variadic functions errors
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>
Diff:
---
gcc/testsuite/rust/compile/non_foreign_variadic_function.rs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/testsuite/rust/compile/non_foreign_variadic_function.rs b/gcc/testsuite/rust/compile/non_foreign_variadic_function.rs
new file mode 100644
index 000000000000..2a4d3090a66b
--- /dev/null
+++ b/gcc/testsuite/rust/compile/non_foreign_variadic_function.rs
@@ -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() {}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 11:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 11:58 [gcc r14-8546] gccrs: Add a test regular variadic functions errors Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).