[PATCH] Fix C++ PR's 31138, 31140, 31141

Doug Gregor doug.gregor@gmail.com
Tue Mar 13 01:10:00 GMT 2007


This patch fixes two ice-on-invalid-code and one ice-on-valid-code
PR's that resulted from the  variadic templates patch.

Tested i686-pc-linux-gnu; no regressions.

Okay for mainline?

  Cheers,
  Doug

:ADDPATCH c++:

2007-03-12  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/31138
	PR c++/31140
	PR c++/31141
	* parser.c (declarator_can_be_parameter_pack): New.
	(cp_parser_template_parameter): Only parse the `...' if the
	declarator can be a parameter pack.
	(cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
	is NULL.
	* pt.c (find_parameter_packs_r): Look into the bounds on integer
	types (they could be used as array bounds).
        (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
	(tsubst_pack_expansion): Handle failure to expand parameter
	packs.

2007-03-12  Douglas Gregor  <doug.gregor@gmail.com>

	* g++.dg/parser/pr31138.C: New.
	* g++.dg/parser/pr31140.C: New.
	* g++.dg/parser/pr31141.C: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vt-ice.patch
Type: text/x-patch
Size: 5001 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070313/925ead94/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vt-ice-testsuite.patch
Type: text/x-patch
Size: 921 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070313/925ead94/attachment-0001.bin>


More information about the Gcc-patches mailing list