aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/error1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/error1.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error1.C11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/error1.C b/gcc/testsuite/g++.dg/cpp0x/error1.C
index 33557f2f80b..115d800bb35 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error1.C
@@ -1,10 +1,17 @@
// PR c++/34395
// { dg-do compile { target c++11 } }
-template<int... N> void foo (int... x[N]) // { dg-message "int \\\[N\\\]\\.\\.\\. x" }
+void f(...);
+template<int... N> void foo (int... x[N]) // { dg-message "declared here" }
{
struct A
{
- A () { x; } // { dg-error "use of parameter from containing function" }
+ A () { f(x...); } // { dg-error "use of parameter from containing function" }
};
}
+
+int main()
+{
+ int ar[4];
+ foo<4>(ar);
+}