+2020-05-20 Nathan Sidwell <nathan@acm.org>
+
+ * 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.
+
2020-05-15 Jason Merrill <jason@redhat.com>
* c-opts.c (set_std_cxx20): Set flag_coroutines.
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;
void
init_c_lex (void)
{
- struct cpp_callbacks *cb;
struct c_fileinfo *toplevel;
/* The get_fileinfo data structure must be initialized before
toplevel->time = body_time;
}
- cb = cpp_get_callbacks (parse_in);
+ struct cpp_callbacks *cb = cpp_get_callbacks (parse_in);
cb->line_change = cb_line_change;
cb->ident = cb_ident;
if (!deps_seen)
return;
- mkdeps *deps = cpp_get_deps (parse_in);
-
- for (size_t i = 0; i < deferred_count; i++)
- {
- struct deferred_opt *opt = &deferred_opts[i];
+ if (mkdeps *deps = cpp_get_deps (parse_in))
+ for (unsigned i = 0; i < deferred_count; i++)
+ {
+ struct deferred_opt *opt = &deferred_opts[i];
- if (opt->code == OPT_MT || opt->code == OPT_MQ)
- deps_add_target (deps, opt->arg, opt->code == OPT_MQ);
- }
+ if (opt->code == OPT_MT || opt->code == OPT_MQ)
+ deps_add_target (deps, opt->arg, opt->code == OPT_MQ);
+ }
}
/* These settings are appropriate for GCC, but not necessarily so for