[gcc r14-7299] gccrs: testsuite: Add test with missing semicolon
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 17:20:33 GMT 2024
https://gcc.gnu.org/g:d43bc24b0aed965d6c2c13b94f2e3414f2e88671
commit r14-7299-gd43bc24b0aed965d6c2c13b94f2e3414f2e88671
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Mon Feb 27 14:08:10 2023 +0100
gccrs: testsuite: Add test with missing semicolon
Add a test to the testsuite in order to verify the presence of a
semicolon at the end of an external type item declaration.
gcc/testsuite/ChangeLog:
* rust/compile/extern_type_item_missing_semi.rs: New failing
test.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs b/gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs
new file mode 100644
index 00000000000..a42af02210f
--- /dev/null
+++ b/gcc/testsuite/rust/compile/extern_type_item_missing_semi.rs
@@ -0,0 +1,7 @@
+// { dg-additional-options "-fsyntax-only" }
+
+extern "C" {
+ type F;
+ type E // { dg-error "failed to parse" }
+} // { dg-error "expecting" }
+// { dg-error "failed to parse item in crate" "" { target *-*-* } .-1 }
More information about the Gcc-cvs
mailing list