aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57981.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57981.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57981.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57981.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57981.C
new file mode 100644
index 0000000..33f4637
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr57981.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall -Wextra" }
+
+template<class T>
+void f(T t, void* = 0) // { dg-warning "unused parameter" }
+{
+}
+
+template<class T>
+auto g(T t) -> decltype(f(t))
+{
+ f(t);
+}
+
+int main()
+{
+ g(0);
+}