aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-05-20 13:43:11 -0700
committerNathan Sidwell <nathan@acm.org>2020-05-20 13:43:11 -0700
commit38a4db21e12816c674406f33d8bc4d064d4211d7 (patch)
tree6ed6d995e37a17fab382d50340f986e5b4188b84 /gcc/c-family
parentc22027a00ede06e3f53170a82aa5b6af8697ddc4 (diff)
downloadgcc-38a4db21e12816c674406f33d8bc4d064d4211d7.zip
gcc-38a4db21e12816c674406f33d8bc4d064d4211d7.tar.gz
gcc-38a4db21e12816c674406f33d8bc4d064d4211d7.tar.bz2
preprocessor: Revert premature change
This part of the cleanup patch turns out to require more pieces to function correctly. I must have got confused over which tree I was testing. The very first map has a different pointer to the file name, so doesn't match with a pointer compare. We were relying on that. * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog2
-rw-r--r--gcc/c-family/c-common.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 90f022c..50614cf 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,5 +1,7 @@
2020-05-20 Nathan Sidwell <nathan@acm.org>
+ * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
+
* 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.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 10c0353..b1379fa 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -8708,8 +8708,7 @@ try_to_locate_new_include_insertion_point (const char *file, location_t loc)
last_ord_map_after_include = NULL;
}
- if (0 == strcmp (ord_map->to_file, file)
- && ord_map->to_line)
+ if (ord_map->to_file == file)
{
if (!first_ord_map_in_file)
first_ord_map_in_file = ord_map;