summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/pr30551-2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/pr30551-2.C')
-rw-r--r--gcc/testsuite/g++.dg/warn/pr30551-2.C6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/pr30551-2.C b/gcc/testsuite/g++.dg/warn/pr30551-2.C
new file mode 100644
index 000000000..8334746a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/pr30551-2.C
@@ -0,0 +1,6 @@
+// PR 30551 -Wmain is enabled by -pedantic/-pedantic-errors.
+// { dg-do compile }
+// { dg-options "-pedantic-errors" }
+// { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } }
+int main(char a) {} /* { dg-error "first argument of .*main.* should be .int." } */
+/* { dg-error "main.* takes only zero or two arguments" "" { target *-*-* } 5 } */