summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/qual-return-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/qual-return-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/qual-return-4.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/qual-return-4.c b/gcc/testsuite/gcc.dg/qual-return-4.c
new file mode 100644
index 000000000..9b61cfebf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/qual-return-4.c
@@ -0,0 +1,10 @@
+/* Test for warnings for qualified function return types. -pedantic
+ test. Only the definition gets a warning for qualified void return
+ types, not other such types within the definition. */
+/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
+/* { dg-do compile } */
+/* { dg-options "-pedantic" } */
+
+volatile void (*y)(int);
+
+volatile void (*vvf(int x))(int) { return y; }