GCC C语言处理主要函数之c_init_decl_processing

来源:互联网 发布:人工神经网络5年数据 编辑:程序博客网 时间:2024/06/02 02:36
 

/* Create the predefined scalar types of C,   and some nodes representing standard constants (0, 1, (void *) 0).   Initialize the global scope.   Make definitions for built-in primitive functions.  */

voidc_init_decl_processing (void){  location_t save_loc = input_location;

  /* Initialize reserved words for parser.  */  c_parse_init ();

  current_function_decl = 0;

  gcc_obstack_init (&parser_obstack);

  /* Make the externals scope.  */  push_scope ();  external_scope = current_scope;

  /* Declarations from c_common_nodes_and_builtins must not be associated     with this input file, lest we get differences between using and not     using preprocessed headers.  */  input_location = BUILTINS_LOCATION;

  c_common_nodes_and_builtins ();

  /* In C, comparisons and TRUTH_* expressions have type int.  */  truthvalue_type_node = integer_type_node;  truthvalue_true_node = integer_one_node;  truthvalue_false_node = integer_zero_node;

  /* Even in C99, which has a real boolean type.  */  pushdecl (build_decl (UNKNOWN_LOCATION, TYPE_DECL, get_identifier ("_Bool"),   boolean_type_node));

  input_location = save_loc;

  make_fname_decl = c_make_fname_decl;  start_fname_decls ();}

 
0 0
原创粉丝点击