Commit e77da14a by Paolo Carlini Committed by Paolo Carlini

re PR c++/57673 (pack sizeof ... groups ellipsis with preceding expression)

/cp
2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57673
	* parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
	token->type == CPP_ELLIPSIS.

/testsuite
2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57673
	* g++.dg/cpp0x/nsdmi-sizeof.C: New.

From-SVN: r201354
parent df4f7bb8
2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57673
* parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
token->type == CPP_ELLIPSIS.
2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57947
* call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
......
......@@ -24145,7 +24145,9 @@ cp_parser_cache_defarg (cp_parser *parser, bool nsdmi)
case CPP_SEMICOLON:
case CPP_CLOSE_BRACE:
case CPP_CLOSE_SQUARE:
if (depth == 0)
if (depth == 0
/* Handle correctly int n = sizeof ... ( p ); */
&& !(nsdmi && token->type == CPP_ELLIPSIS))
done = true;
/* Update DEPTH, if necessary. */
else if (token->type == CPP_CLOSE_PAREN
......
2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57673
* g++.dg/cpp0x/nsdmi-sizeof.C: New.
2013-07-30 Steve Ellcey <sellcey@mips.com>
* gcc.target/mips/code-readable-1.c: Increase switch size.
......
// PR c++/57673
// { dg-do compile { target c++11 } }
template< int ... p >
struct d {
int n = sizeof ... ( p );
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment