[gcc r14-8053] gccrs: Add a new test for mbe named macro_rules
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 18:14:32 GMT 2024
https://gcc.gnu.org/g:1e841fd604680b07968a9142388633fb50384e16
commit r14-8053-g1e841fd604680b07968a9142388633fb50384e16
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Oct 17 14:56:09 2023 +0200
gccrs: Add a new test for mbe named macro_rules
Macro rules named macro_rules may cause some problems if not handled
correctly. This new test ensure we always compile those macros named
macro_rules correctly as well as other macro definitions.
gcc/testsuite/ChangeLog:
* rust/compile/macro57.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
gcc/testsuite/rust/compile/macro57.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gcc/testsuite/rust/compile/macro57.rs b/gcc/testsuite/rust/compile/macro57.rs
new file mode 100644
index 00000000000..0640d2f8305
--- /dev/null
+++ b/gcc/testsuite/rust/compile/macro57.rs
@@ -0,0 +1,13 @@
+macro_rules! macro_rules {
+ () => {};
+}
+
+macro_rules! foo {
+ () => {};
+}
+
+foo!();
+
+fn main() {}
+
+macro_rules!();
More information about the Gcc-cvs
mailing list