summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-09 22:59:33 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-09 22:59:33 +0000
commitff3208462a1e26541618fda083d85caf391f5cab (patch)
treecedc8a66192eeca3f9721271482ef9b516380438 /gcc/testsuite
parent469b7a3d586c65fdc68864a78d5219ecf3f29d2f (diff)
downloadgcc-ff3208462a1e26541618fda083d85caf391f5cab.tar.gz
/cp
2013-12-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/59435 * parser.c (cp_parser_cache_defarg): sizeof ... ( p ) can occur in a default argument too. /testsuite 2013-12-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/59435 * g++.dg/cpp0x/variadic-sizeof3.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205836 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C15
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ae5983a6fc2..b1b043c1e20 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59435
+ * g++.dg/cpp0x/variadic-sizeof3.C: New.
+
2013-12-09 David Malcolm <dmalcolm@redhat.com>
* g++.dg/plugin/selfassign.c (execute_warn_self_assign): Eliminate
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C
new file mode 100644
index 00000000000..7296500a3ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C
@@ -0,0 +1,15 @@
+// PR c++/59435
+// { dg-require-effective-target c++11 }
+
+template <typename... E>
+struct T
+{
+ T(unsigned int i = sizeof...(E)){} // does not compile
+
+ static constexpr unsigned int U = sizeof...(E);
+ T(unsigned int j, unsigned int i = U){} // compile
+};
+
+template <typename... T>
+void test(int i = sizeof...(T)) // compile
+{}