FreeBSD/contrib/gcc/cp/parser.c
/* Special handling for the first token or line in the file.  The first
   thing in the file might be #pragma GCC pch_preprocess, which loads a
   PCH file, which is a GC collection point.  So we need to handle this
   first pragma without benefit of an existing lexer structure.

   Always returns one token to the caller in *FIRST_TOKEN.  This is
   either the true first token of the file, or the first token after
   the initial pragma.  */
Special handling for the first token or line in the file.  The first
thing in the file might be #pragma GCC pch_preprocess, which loads a
PCH file, which is a GC collection point.  So we need to handle this
first pragma without benefit of an existing lexer structure.

Always returns one token to the caller in *FIRST_TOKEN.  This is
either the true first token of the file, or the first token after
the initial pragma.
Special handling for the first token or line in the file . The first thing in the file might be #pragma GCC pch_preprocess which loads a PCH file which is a GC collection point . So we need to handle this first pragma without benefit of an existing lexer structure . Always returns one token to the caller in * FIRST_TOKEN . This is either the true first token of the file or the first token after the initial pragma .
static void
cp_parser_initial_pragma (cp_token *first_token)
{
  tree name = NULL;
  cp_lexer_get_preprocessor_token (NULL, first_token);
  if (first_token->pragma_kind != PRAGMA_GCC_PCH_PREPROCESS)
    return;
  cp_lexer_get_preprocessor_token (NULL, first_token);
  if (first_token->type == CPP_STRING)
    {
      name = first_token->u.value;
      cp_lexer_get_preprocessor_token (NULL, first_token);
      if (first_token->type != CPP_PRAGMA_EOL)
	error ("junk at end of %<#pragma GCC pch_preprocess%>");
    }
  else
    error ("expected string literal");
  while (first_token->type != CPP_PRAGMA_EOL && first_token->type != CPP_EOF)
    cp_lexer_get_preprocessor_token (NULL, first_token);
  if (name)
    c_common_pch_pragma (parse_in, TREE_STRING_POINTER (name));
  cp_lexer_get_preprocessor_token (NULL, first_token);
}
static void cp_parser_initial_pragma ( cp_token * first_token ) { tree name = NULL ; cp_lexer_get_preprocessor_token ( NULL , first_token ) ; if ( first_token -> pragma_kind != PRAGMA_GCC_PCH_PREPROCESS ) return ; cp_lexer_get_preprocessor_token ( NULL , first_token ) ; if ( first_token -> type == CPP_STRING ) { name = first_token -> u . value ; cp_lexer_get_preprocessor_token ( NULL , first_token ) ; if ( first_token -> type != CPP_PRAGMA_EOL ) error ( " " ) ; } else error ( " " ) ; while ( first_token -> type != CPP_PRAGMA_EOL && first_token -> type != CPP_EOF ) cp_lexer_get_preprocessor_token ( NULL , first_token ) ; if ( name ) c_common_pch_pragma ( parse_in , TREE_STRING_POINTER ( name ) ) ; cp_lexer_get_preprocessor_token ( NULL , first_token ) ; }
Special handling for the first token or line in the file.
Special handling for the first token or line in the file .
/* Skip to the end of the pragma.  */ /* Now actually load the PCH file.  */ /* Read one more token to return to our caller.  We have to do this
     after reading the PCH file in, since its pointers have to be
     live.  */