FreeBSD/contrib/gcc/c-parser.c
/* Parse the body of an if statement or the else half thereof.  This
   is just parsing a statement but (a) it is a block in C99, (b) we
   track whether the body is an if statement for the sake of
   -Wparentheses warnings, (c) we handle an empty body specially for
   the sake of -Wextra warnings.  */
Parse the body of an if statement or the else half thereof.  This
is just parsing a statement but (a) it is a block in C99, (b) we
track whether the body is an if statement for the sake of
Wparentheses warnings, (c) we handle an empty body specially for
the sake of -Wextra warnings.
Parse the body of an if statement or the else half thereof . This is just parsing a statement but ( a ) it is a block in C99 ( b ) we track whether the body is an if statement for the sake of Wparentheses warnings ( c ) we handle an empty body specially for the sake of - Wextra warnings .
static tree
c_parser_if_body (c_parser *parser, bool *if_p)
{
  tree block = c_begin_compound_stmt (flag_isoc99);
  while (c_parser_next_token_is_keyword (parser, RID_CASE)
	 || c_parser_next_token_is_keyword (parser, RID_DEFAULT)
	 || (c_parser_next_token_is (parser, CPP_NAME)
	     && c_parser_peek_2nd_token (parser)->type == CPP_COLON))
    c_parser_label (parser);
  *if_p = c_parser_next_token_is_keyword (parser, RID_IF);
  if (extra_warnings && c_parser_next_token_is (parser, CPP_SEMICOLON))
    add_stmt (build_empty_stmt ());
  c_parser_statement_after_labels (parser);
  return c_end_compound_stmt (block, flag_isoc99);
}
static tree c_parser_if_body ( c_parser * parser , bool * if_p ) { tree block = c_begin_compound_stmt ( flag_isoc99 ) ; while ( c_parser_next_token_is_keyword ( parser , RID_CASE ) || c_parser_next_token_is_keyword ( parser , RID_DEFAULT ) || ( c_parser_next_token_is ( parser , CPP_NAME ) && c_parser_peek_2nd_token ( parser ) -> type == CPP_COLON ) ) c_parser_label ( parser ) ; * if_p = c_parser_next_token_is_keyword ( parser , RID_IF ) ; if ( extra_warnings && c_parser_next_token_is ( parser , CPP_SEMICOLON ) ) add_stmt ( build_empty_stmt ( ) ) ; c_parser_statement_after_labels ( parser ) ; return c_end_compound_stmt ( block , flag_isoc99 ) ; }
Parse the body of an if statement or the else half thereof.
Parse the body of an if statement or the else half thereof .