summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-05-20 11:15:34 -0700
committerNathan Sidwell <nathan@acm.org>2020-05-20 11:17:52 -0700
commitc22027a00ede06e3f53170a82aa5b6af8697ddc4 (patch)
treef4ca1067bcafb8009bd9ed8db4c065d37c53f1c4 /gcc/c-family/c-common.c
parent2a8565fa1182ed326721a50c700f9f5275355d40 (diff)
downloadgcc-c22027a00ede06e3f53170a82aa5b6af8697ddc4.tar.gz
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.
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c3
1 files changed, 2 insertions, 1 deletions
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;