diff options
author | Jason Merrill <jason@redhat.com> | 2008-04-28 16:43:27 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2008-04-28 16:43:27 -0400 |
commit | bda37952740179739cc1e1fc034fcace001660f6 (patch) | |
tree | 3e397d28969051c4bba11dca77914faf41b4189d /gcc/testsuite | |
parent | d6b68fccba3828011c63478f4f1a758145a94b19 (diff) | |
download | gcc-bda37952740179739cc1e1fc034fcace001660f6.zip gcc-bda37952740179739cc1e1fc034fcace001660f6.tar.gz gcc-bda37952740179739cc1e1fc034fcace001660f6.tar.bz2 |
re PR c++/57 ([DR 325] GCC can't parse a non-parenthesized comma in a template-id within a default argument)
PR c++/57
* parser.c (cp_parser_parameter_declaration): Handle < ambiguity
in default arguments.
Co-Authored-By: Liu Guanwei <liu_gw@163.com>
From-SVN: r134762
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/defarg8.C | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C b/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C index 239672d..a72e85c 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C @@ -3,15 +3,15 @@ // Default arguments containing more than one non-nested explicit // template argument leads to parse error -// This might be ill formed. See DR 325 (which would like to make it -// so) +// This might be ill formed. See DR 325 (one proposed resolution is to make +// it so) template <class T> class foo1; -template <class T, class U> class foo2; // { dg-error "" } +template <class T, class U> class foo2; struct bar { template <class T, class U> bar(int i = foo1<T>::baz, // { dg-bogus "" } - int j = int(foo2<T, U>::baz), // ok - int k = foo2<T, U>::baz) {} // { dg-error "" } + int k = foo2<T, U>::baz) {} // ok? }; |