From a01f151f1e03f9b2bf4148fc3f18f114bb6806b0 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 11 Jun 2017 01:29:14 -0400 Subject: tree.h (id_equal): New. * tree.h (id_equal): New. * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c, omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it instead of strcmp of IDENTIFIER_POINTER. c-family/ * c-ada-spec.c, c-pragma.c: Use it. cp/ * cp-tree.h, decl2.c, mangle.c, parser.c, pt.c, semantics.c: Use it. From-SVN: r249103 --- gcc/c-family/c-pragma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/c-family/c-pragma.c') diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index bc36626..48b02b8 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -514,7 +514,7 @@ handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy)) const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); name = targetm.strip_name_encoding (name); - if (strcmp (name, IDENTIFIER_POINTER (newname))) + if (!id_equal (newname, name)) warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to " "conflict with previous rename"); } @@ -587,7 +587,7 @@ maybe_apply_renaming_pragma (tree decl, tree asmname) if (DECL_NAME (decl) == p->oldname) { /* Only warn if there is a conflict. */ - if (strcmp (IDENTIFIER_POINTER (p->newname), oldname)) + if (!id_equal (p->newname, oldname)) warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to " "conflict with previous rename"); -- cgit v1.1