[C++ Patch] PR 29731

Mark Mitchell mark@codesourcery.com
Wed Sep 5 00:19:00 GMT 2007


Paolo Carlini wrote:

> /cp
> 2007-09-03  Paolo Carlini  <pcarlini@suse.de>
> 
> 	PR c++/29731 (again)
> 	* parser.c (cp_parser_primary_expression): Return error_mark_node
> 	when a statement-expression is found in a template-argument list.
> 
> /testsuite
> 2007-09-03  Paolo Carlini  <pcarlini@suse.de>
> 
> 	PR c++/29731
> 	* g++.dg/parse/template24.C: New.

This is OK.

What does your patch do about things like:

  X<sizeof ({ int i; i; })>

It's fine by me to reject that.  (Anybody want to try to mangle *that*?)
 But, I'm curious because, in theory, it's a sensible thing to do.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list