FreeBSD/contrib/gcc/cp/parser.c
/* If not parsing tentatively, issue a diagnostic of the form
      FILE:LINE: MESSAGE before TOKEN
   where TOKEN is the next token in the input stream.  MESSAGE
   (specified by the caller) is usually of the form "expected
   OTHER-TOKEN".  */
If not parsing tentatively, issue a diagnostic of the form
FILE:LINE: MESSAGE before TOKEN
where TOKEN is the next token in the input stream.  MESSAGE
(specified by the caller) is usually of the form "expected
OTHER-TOKEN".
If not parsing tentatively issue a diagnostic of the form FILE : LINE : MESSAGE before TOKEN where TOKEN is the next token in the input stream . MESSAGE ( specified by the caller ) is usually of the form " expected OTHER - TOKEN " .
static void
cp_parser_error (cp_parser* parser, const char* message)
{
  if (!cp_parser_simulate_error (parser))
    {
      cp_token *token = cp_lexer_peek_token (parser->lexer);
      cp_lexer_set_source_position_from_token (token);
      if (token->type == CPP_PRAGMA)
	{
	  error ("%<#pragma%> is not allowed here");
	  cp_parser_skip_to_pragma_eol (parser, token);
	  return;
	}
      c_parse_error (message,
		     (token->type == CPP_KEYWORD ? CPP_NAME : token->type),
		     token->u.value);
    }
}
static void cp_parser_error ( cp_parser * parser , const char * message ) { if ( ! cp_parser_simulate_error ( parser ) ) { cp_token * token = cp_lexer_peek_token ( parser -> lexer ) ; cp_lexer_set_source_position_from_token ( token ) ; if ( token -> type == CPP_PRAGMA ) { error ( " " ) ; cp_parser_skip_to_pragma_eol ( parser , token ) ; return ; } c_parse_error ( message , ( token -> type == CPP_KEYWORD ? CPP_NAME : token -> type ) , token -> u . value ) ; } }
If not parsing tentatively, issue a diagnostic of the form
FILE:LINE: MESSAGE before TOKEN
where TOKEN is the next token in the input stream.
If not parsing tentatively issue a diagnostic of the form FILE : LINE : MESSAGE before TOKEN where TOKEN is the next token in the input stream .
/* This diagnostic makes more sense if it is tagged to the line
	 of the token we just peeked at.  */ /* Because c_parser_error does not understand
			CPP_KEYWORD, keywords are treated like
			identifiers.  */