参照元

説明

引数

返り値

参考

実装

/* Front-end wrappers for pragma registration to avoid dragging
   cpplib.h in almost everywhere.  */

static void
c_register_pragma_1 (const char *space, const char *name,
                     internal_pragma_handler ihandler, bool allow_expansion)
{
  unsigned id;

  if (flag_preprocess_only)
    {
      pragma_ns_name ns_name;
      if (!allow_expansion)
	return;

      ns_name.space = space;
      ns_name.name = name;
      registered_pp_pragmas.safe_push (ns_name);
      id = registered_pp_pragmas.length ();
      id += PRAGMA_FIRST_EXTERNAL - 1;
    }
  else
    {
      registered_pragmas.safe_push (ihandler);
      id = registered_pragmas.length ();
      id += PRAGMA_FIRST_EXTERNAL - 1;

      /* The C front end allocates 8 bits in c_token.  The C++ front end
	 keeps the pragma kind in the form of INTEGER_CST, so no small
	 limit applies.  At present this is sufficient.  */
      gcc_assert (id < 256);
    }
  cpp_register_deferred_pragma (parse_in, space, name, id,
				allow_expansion, false);
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2019-06-24 (月) 11:40:01