細編集の要約なし |
編集の要約なし |
||
3行目: | 3行目: | ||
== 概要 == |
== 概要 == |
||
*[[gcc-4.1.0/gcc/c-opts.c]]にて定義 |
*[[gcc-4.1.0/gcc/c-opts.c]]にて定義 |
||
+ | *C言語であれば[[lang_hooks]]のparse_file変数(関数ポインタ)に代入される |
||
+ | **つまり[[compile_file]]の途中で呼ばれる関数 |
||
== 引数 == |
== 引数 == |
||
29行目: | 31行目: | ||
1136 { |
1136 { |
||
1137 /* Start the main input file, if the debug writer wants it. */ |
1137 /* Start the main input file, if the debug writer wants it. */ |
||
− | 1138 if (debug_hooks->start_end_main_source_file) |
+ | 1138 if ([[debug_hooks]]->start_end_main_source_file) |
− | 1139 (*debug_hooks->start_source_file) (0, this_input_filename); |
+ | 1139 (*[[debug_hooks]]->start_source_file) (0, [[this_input_filename]]); |
1140 [[finish_options]] (); |
1140 [[finish_options]] (); |
||
1141 [[pch_init]] (); |
1141 [[pch_init]] (); |
||
38行目: | 40行目: | ||
1145 [[pop_file_scope]] (); |
1145 [[pop_file_scope]] (); |
||
1146 /* And end the main input file, if the debug writer wants it */ |
1146 /* And end the main input file, if the debug writer wants it */ |
||
− | 1147 if (debug_hooks->start_end_main_source_file) |
+ | 1147 if ([[debug_hooks]]->start_end_main_source_file) |
− | 1148 (*debug_hooks->end_source_file) (0); |
+ | 1148 (*[[debug_hooks]]->end_source_file) (0); |
− | 1149 if (++i >= num_in_fnames) |
+ | 1149 if (++i >= [[num_in_fnames]]) |
1150 break; |
1150 break; |
||
− | 1151 [[cpp_undef_all]] (parse_in); |
+ | 1151 [[cpp_undef_all]] ([[parse_in]]); |
− | 1152 this_input_filename |
+ | 1152 [[this_input_filename]] |
− | 1153 = [[cpp_read_main_file]] (parse_in, in_fnames[i]); |
+ | 1153 = [[cpp_read_main_file]] ([[parse_in]], [[in_fnames]][i]); |
1154 /* If an input file is missing, abandon further compilation. |
1154 /* If an input file is missing, abandon further compilation. |
||
1155 cpplib has issued a diagnostic. */ |
1155 cpplib has issued a diagnostic. */ |
||
− | 1156 if (!this_input_filename) |
+ | 1156 if (![[this_input_filename]]) |
1157 break; |
1157 break; |
||
1158 } |
1158 } |
2007年8月19日 (日) 06:48時点における版
このページを編集する際は,編集に関する方針に従ってください.
概要
- gcc-4.1.0/gcc/c-opts.cにて定義
- C言語であればlang_hooksのparse_file変数(関数ポインタ)に代入される
- つまりcompile_fileの途中で呼ばれる関数
引数
- int set_yydebug
実装
1118 /* Initialize the integrated preprocessor after debug output has been
1119 initialized; loop over each input file. */
1120 void
1121 c_common_parse_file (int set_yydebug)
1122 {
1123 unsigned int i;
1124
1125 /* Enable parser debugging, if requested and we can. If requested
1126 and we can't, notify the user. */
1127 #if YYDEBUG != 0
1128 yydebug = set_yydebug;
1129 #else
1130 if (set_yydebug)
1131 warning (0, "YYDEBUG was not defined at build time, -dy ignored");
1132 #endif
1133
1134 i = 0;
1135 for (;;)
1136 {
1137 /* Start the main input file, if the debug writer wants it. */
1138 if (debug_hooks->start_end_main_source_file)
1139 (*debug_hooks->start_source_file) (0, this_input_filename);
1140 finish_options ();
1141 pch_init ();
1142 push_file_scope ();
1143 c_parse_file ();
1144 finish_file ();
1145 pop_file_scope ();
1146 /* And end the main input file, if the debug writer wants it */
1147 if (debug_hooks->start_end_main_source_file)
1148 (*debug_hooks->end_source_file) (0);
1149 if (++i >= num_in_fnames)
1150 break;
1151 cpp_undef_all (parse_in);
1152 this_input_filename
1153 = cpp_read_main_file (parse_in, in_fnames[i]);
1154 /* If an input file is missing, abandon further compilation.
1155 cpplib has issued a diagnostic. */
1156 if (!this_input_filename)
1157 break;
1158 }
1159 }