2013-07-09 Jason Merrill <jason@redhat.com>
+ PR c++/57471
+ * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
+
PR c++/57658
* semantics.c (finish_id_expression): Return the id for an
unevaluated outer variable.
cp_token *token = cp_lexer_peek_token (parser->lexer);
tree name = cp_parser_identifier (parser);
+ /* The name is not qualified. */
+ parser->scope = NULL_TREE;
+ parser->qualifying_scope = NULL_TREE;
+ parser->object_scope = NULL_TREE;
tree expr = cp_parser_lookup_name_simple (parser, name, token->location);
if (expr == error_mark_node)
cp_parser_name_lookup_error (parser, name, expr, NLE_NULL,
--- /dev/null
+// PR c++/57471
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ static constexpr bool value = true;
+};
+
+template<typename... Types>
+struct B
+{
+ static_assert(A::value, "");
+ static_assert(sizeof...(Types) == 0, "");
+};