m3-sys/m3cc/gcc-apple/gcc/c-parser.c
/* Handle pragmas.  Some OpenMP pragmas are associated with, and therefore
   should be considered, statements.  ALLOW_STMT is true if we're within
   the context of a function and such pragmas are to be allowed.  Returns
   true if we actually parsed such a pragma.  */
Handle pragmas.  Some OpenMP pragmas are associated with, and therefore
should be considered, statements.  ALLOW_STMT is true if we're within
the context of a function and such pragmas are to be allowed.  Returns
true if we actually parsed such a pragma.
Handle pragmas . Some OpenMP pragmas are associated with and therefore should be considered statements . ALLOW_STMT is true if we ' re within the context of a function and such pragmas are to be allowed . Returns true if we actually parsed such a pragma .
static bool
c_parser_pragma (c_parser *parser, enum pragma_context context)
{
  unsigned int id;
  id = c_parser_peek_token (parser)->pragma_kind;
  gcc_assert (id != PRAGMA_NONE);
  switch (id)
    {
    case PRAGMA_OMP_BARRIER:
      if (context != pragma_compound)
	{
	  if (context == pragma_stmt)
	    c_parser_error (parser, "%<#pragma omp barrier%> may only be "
			    "used in compound statements");
	  goto bad_stmt;
	}
      c_parser_omp_barrier (parser);
      return false;
    case PRAGMA_OMP_FLUSH:
      if (context != pragma_compound)
	{
	  if (context == pragma_stmt)
	    c_parser_error (parser, "%<#pragma omp flush%> may only be "
			    "used in compound statements");
	  goto bad_stmt;
	}
      c_parser_omp_flush (parser);
      return false;
    case PRAGMA_OMP_THREADPRIVATE:
      c_parser_omp_threadprivate (parser);
      return false;
    case PRAGMA_OMP_SECTION:
      error ("%<#pragma omp section%> may only be used in "
	     "%<#pragma omp sections%> construct");
      c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL);
      return false;
    case PRAGMA_GCC_PCH_PREPROCESS:
      c_parser_error (parser, "%<#pragma GCC pch_preprocess%> must be first");
      c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL);
      return false;
    default:
      if (id < PRAGMA_FIRST_EXTERNAL)
	{
	  if (context == pragma_external)
	    {
	    bad_stmt:
	      c_parser_error (parser, "expected declaration specifiers");
	      c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL);
	      return false;
	    }
	  c_parser_omp_construct (parser);
	  return true;
	}
      break;
    }
  c_parser_consume_pragma (parser);
  c_invoke_pragma_handler (id);
  parser->error = true;
  c_parser_skip_to_pragma_eol (parser);
  return false;
}
static bool c_parser_pragma ( c_parser * parser , enum pragma_context context ) { unsigned int id ; id = c_parser_peek_token ( parser ) -> pragma_kind ; gcc_assert ( id != PRAGMA_NONE ) ; switch ( id ) { case PRAGMA_OMP_BARRIER : if ( context != pragma_compound ) { if ( context == pragma_stmt ) c_parser_error ( parser , " " " " ) ; goto bad_stmt ; } c_parser_omp_barrier ( parser ) ; return false ; case PRAGMA_OMP_FLUSH : if ( context != pragma_compound ) { if ( context == pragma_stmt ) c_parser_error ( parser , " " " " ) ; goto bad_stmt ; } c_parser_omp_flush ( parser ) ; return false ; case PRAGMA_OMP_THREADPRIVATE : c_parser_omp_threadprivate ( parser ) ; return false ; case PRAGMA_OMP_SECTION : error ( " " " " ) ; c_parser_skip_until_found ( parser , CPP_PRAGMA_EOL , NULL ) ; return false ; case PRAGMA_GCC_PCH_PREPROCESS : c_parser_error ( parser , " " ) ; c_parser_skip_until_found ( parser , CPP_PRAGMA_EOL , NULL ) ; return false ; default : if ( id < PRAGMA_FIRST_EXTERNAL ) { if ( context == pragma_external ) { bad_stmt : c_parser_error ( parser , " " ) ; c_parser_skip_until_found ( parser , CPP_PRAGMA_EOL , NULL ) ; return false ; } c_parser_omp_construct ( parser ) ; return true ; } break ; } c_parser_consume_pragma ( parser ) ; c_invoke_pragma_handler ( id ) ; parser -> error = true ; c_parser_skip_to_pragma_eol ( parser ) ; return false ; }
Handle pragmas.
Handle pragmas .
/* Skip to EOL, but suppress any error message.  Those will have been 
     generated by the handler routine through calling error, as opposed
     to calling c_parser_error.  */