From: jakub Date: Tue, 11 May 2010 19:54:51 +0000 (+0000) Subject: * c-opts.c (c_common_parse_file): If start_end_main_source_file, X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=dd69036730e59dd0d2be1d6c7b46994707396573 * c-opts.c (c_common_parse_file): If start_end_main_source_file, don't call start_source_file debug hook here... (finish_options): ... but here, after outputting predefined and command line defines and undefs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159293 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24f210b3cc6..b9b67952f1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-05-11 Jakub Jelinek + * c-opts.c (c_common_parse_file): If start_end_main_source_file, + don't call start_source_file debug hook here... + (finish_options): ... but here, after outputting predefined and + command line defines and undefs. + PR middle-end/44071 * cfglayout.c (fixup_reorder_chain): Allow asm goto to have no fallthru edge. diff --git a/gcc/c-opts.c b/gcc/c-opts.c index b7211575650..d57cf91e355 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1388,9 +1388,6 @@ c_common_parse_file (int set_yydebug) i = 0; for (;;) { - /* Start the main input file, if the debug writer wants it. */ - if (debug_hooks->start_end_main_source_file) - (*debug_hooks->start_source_file) (0, this_input_filename); finish_options (); pch_init (); push_file_scope (); @@ -1649,6 +1646,11 @@ finish_options (void) } } + /* Start the main input file, if the debug writer wants it. */ + if (debug_hooks->start_end_main_source_file + && !flag_preprocess_only) + (*debug_hooks->start_source_file) (0, this_input_filename); + /* Handle -imacros after -D and -U. */ for (i = 0; i < deferred_count; i++) { @@ -1663,8 +1665,16 @@ finish_options (void) } } } - else if (cpp_opts->directives_only) - cpp_init_special_builtins (parse_in); + else + { + if (cpp_opts->directives_only) + cpp_init_special_builtins (parse_in); + + /* Start the main input file, if the debug writer wants it. */ + if (debug_hooks->start_end_main_source_file + && !flag_preprocess_only) + (*debug_hooks->start_source_file) (0, this_input_filename); + } include_cursor = 0; push_command_line_include ();