From c22027a00ede06e3f53170a82aa5b6af8697ddc4 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 20 May 2020 11:15:34 -0700 Subject: preprocessor: cleanups in c-common handling * c-common.c (try_to_locate_new_include_insertion_point): Use strcmp to compare filenames. * c-lex.c (init_c_lex): Move declaration to initialization. * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into deferred count loop. --- gcc/c-family/c-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/c-family/c-common.c') diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index b1379faa412..10c0353fe4e 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -8708,7 +8708,8 @@ try_to_locate_new_include_insertion_point (const char *file, location_t loc) last_ord_map_after_include = NULL; } - if (ord_map->to_file == file) + if (0 == strcmp (ord_map->to_file, file) + && ord_map->to_line) { if (!first_ord_map_in_file) first_ord_map_in_file = ord_map; -- cgit v1.2.1