]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/semantics.c
re PR c++/31431 (ICE with invalid parameter pack)
authorDouglas Gregor <doug.gregor@gmail.com>
Fri, 25 May 2007 13:15:04 +0000 (13:15 +0000)
committerDoug Gregor <dgregor@gcc.gnu.org>
Fri, 25 May 2007 13:15:04 +0000 (13:15 +0000)
commitb1d7b1c00e10e3550b2b1bfc91168679463e457f
tree626e35a9a9d851c0a1a037eb6349540dc9831f0e
parent77315816df628ed27788142071b54e0f31752313
re PR c++/31431 (ICE with invalid parameter pack)

2007-05-25  Douglas Gregor <doug.gregor@gmail.com>

PR c++/31431
PR c++/31432
PR c++/31434
PR c++/31435
PR c++/31437
PR c++/31438
PR c++/31442
PR c++/31443
PR c++/31444
PR c++/31445
* error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
* cp-tree.h (check_for_bare_parameter_packs): Returns bool.
* pt.c (check_for_bare_parameter_packs): Return bool indicated
whether everything was okay. Fix indentation.
(push_template_decl_real): Check for bare parameter packs in
function parameters; where errors occur, mark the parameter types
with ERROR_MARK_NODEs to avert ICEs.
(coerce_template_parameter_pack): New.
(coerce_template_parms): Moved parameter pack coercion into
coerce_template_parameter_pack, and permit it anywhere in the
template parameter list (not just at the end). Parameter and
argument indices can vary (somewhat) separately now, so add
PARM_IDX and ARG_IDX.
(fn_type_unification): Don't set an argument pack as incomplete if
no argument pack was deduced.
(type_unification_real): If a type parameter is a parameter pack
and has not otherwise been deduced, it will be deduced to an empty
parameter pack.
(more_specialized_fn): Use the actual lengths of the argument
lists when comparing against expansions.
* semantics.c (finish_member_declaration): If a field's type has
bare parameter packs, error and set its type to ERROR_MARK_NODE.

2007-05-25  Douglas Gregor <doug.gregor@gmail.com>

PR c++/31431
PR c++/31432
PR c++/31434
PR c++/31435
PR c++/31437
PR c++/31438
PR c++/31442
PR c++/31443
PR c++/31444
PR c++/31445
* g++.dg/cpp0x/pr31431.C: New.
* g++.dg/cpp0x/pr31437.C: New.
* g++.dg/cpp0x/pr31442.C: New.
* g++.dg/cpp0x/pr31444.C: New.
* g++.dg/cpp0x/pr31431-2.C: New.
* g++.dg/cpp0x/pr31432.C: New.
* g++.dg/cpp0x/pr31434.C: New.
* g++.dg/cpp0x/pr31438.C: New.
* g++.dg/cpp0x/pr31443.C: New.
* g++.dg/cpp0x/pr31445.C: New.
* g++.dg/cpp0x/variadic-crash1.C: New.

From-SVN: r125062
17 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/error.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr31431-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31431.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31432.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31434.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31437.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31438.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31442.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31443.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31444.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr31445.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C [new file with mode: 0644]