llvm-gcc-4.2-2.9/gcc/cp/parser.c
/* Parse an exception-declaration.

   exception-declaration:
     type-specifier-seq declarator
     type-specifier-seq abstract-declarator
     type-specifier-seq
     ...

   Returns a VAR_DECL for the declaration, or NULL_TREE if the
   ellipsis variant is used.  */
Parse an exception-declaration.

Returns a VAR_DECL for the declaration, or NULL_TREE if the
ellipsis variant is used.
Parse an exception - declaration . Returns a VAR_DECL for the declaration or NULL_TREE if the ellipsis variant is used .
static tree
cp_parser_exception_declaration (cp_parser* parser)
{
  cp_decl_specifier_seq type_specifiers;
  cp_declarator *declarator;
  const char *saved_message;
  if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS))
    {
      cp_lexer_consume_token (parser->lexer);
      return NULL_TREE;
    }
  saved_message = parser->type_definition_forbidden_message;
  parser->type_definition_forbidden_message
    = "types may not be defined in exception-declarations";
  cp_parser_type_specifier_seq (parser, false,
				&type_specifiers);
  if (cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_PAREN))
    declarator = NULL;
  else
    declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_EITHER,
				       NULL,
				       NULL,
				       false);
  parser->type_definition_forbidden_message = saved_message;
  if (!type_specifiers.any_specifiers_p)
    return error_mark_node;
  return grokdeclarator (declarator, &type_specifiers, CATCHPARM, 1, NULL);
}
static tree cp_parser_exception_declaration ( cp_parser * parser ) { cp_decl_specifier_seq type_specifiers ; cp_declarator * declarator ; const char * saved_message ; if ( cp_lexer_next_token_is ( parser -> lexer , CPP_ELLIPSIS ) ) { cp_lexer_consume_token ( parser -> lexer ) ; return NULL_TREE ; } saved_message = parser -> type_definition_forbidden_message ; parser -> type_definition_forbidden_message = " " ; cp_parser_type_specifier_seq ( parser , false , & type_specifiers ) ; if ( cp_lexer_next_token_is ( parser -> lexer , CPP_CLOSE_PAREN ) ) declarator = NULL ; else declarator = cp_parser_declarator ( parser , CP_PARSER_DECLARATOR_EITHER , NULL , NULL , false ) ; parser -> type_definition_forbidden_message = saved_message ; if ( ! type_specifiers . any_specifiers_p ) return error_mark_node ; return grokdeclarator ( declarator , & type_specifiers , CATCHPARM , 1 , NULL ) ; }
Parse an exception-declaration.
Parse an exception - declaration .
/* If it's an ellipsis, it's easy to handle.  */ /* Consume the `...' token.  */ /* Types may not be defined in exception-declarations.  */ /* Parse the type-specifier-seq.  */ /*is_condition=*/ /* If it's a `)', then there is no declarator.  */ /*ctor_dtor_or_conv_p=*/ /*parenthesized_p=*/ /*member_p=*/ /* Restore the saved message.  */