FreeBSD/contrib/gcc/cp/parser.c
/* Parse a constant-initializer.

   constant-initializer:
     = constant-expression

   Returns a representation of the constant-expression.  */
Parse a constant-initializer.
constant-initializer:
constant-expression

Returns a representation of the constant-expression.
Parse a constant - initializer . constant - initializer : constant - expression Returns a representation of the constant - expression .
static tree
cp_parser_constant_initializer (cp_parser* parser)
{
  if (!cp_parser_require (parser, CPP_EQ, "`='"))
    return error_mark_node;
  if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE))
    {
      cp_parser_error (parser,
		       "a brace-enclosed initializer is not allowed here");
      cp_lexer_consume_token (parser->lexer);
      cp_parser_skip_to_closing_brace (parser);
      cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'");
      return error_mark_node;
    }
  return cp_parser_constant_expression (parser,
					false,
					NULL);
}
static tree cp_parser_constant_initializer ( cp_parser * parser ) { if ( ! cp_parser_require ( parser , CPP_EQ , " " ) ) return error_mark_node ; if ( cp_lexer_next_token_is ( parser -> lexer , CPP_OPEN_BRACE ) ) { cp_parser_error ( parser , " " ) ; cp_lexer_consume_token ( parser -> lexer ) ; cp_parser_skip_to_closing_brace ( parser ) ; cp_parser_require ( parser , CPP_CLOSE_BRACE , " " ) ; return error_mark_node ; } return cp_parser_constant_expression ( parser , false , NULL ) ; }
Parse a constant-initializer.
Parse a constant - initializer .
/* Look for the `=' token.  */ /* It is invalid to write:

       struct S { static const int i = { 7 }; };

     */ /* Consume the opening brace.  */ /* Skip the initializer.  */ /* Look for the trailing `}'.  */ /*allow_non_constant=*/