tlink.c (scan_linker_output): Look for keywords before accepting a mangled name in...
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 17 Sep 1999 18:35:31 +0000 (18:35 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 17 Sep 1999 18:35:31 +0000 (14:35 -0400)
* tlink.c (scan_linker_output): Look for keywords before accepting
a mangled name in quotes.

From-SVN: r29479

gcc/ChangeLog
gcc/tlink.c

index 5667361e87b9bfc356c3fb3bc702dc42689f2bbb..8860f6cc8350e4a49f4376e7927a9066877f92a8 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 17 11:14:17 1999  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * tlink.c (scan_linker_output): Look for keywords before accepting
+       a mangled name in quotes.
+
 Thu Sep 16 16:47:08 1999  Richard Henderson  <rth@cygnus.com>
 
        * alpha/alpha-interix.h (DWARF2_UNWIND_INFO): Define to zero.
index a3df317389f1896b40c2488c19922b2c02b29f36..619c8c83b201375da4802fa2c4269ca490e83ad4 100644 (file)
@@ -1,7 +1,7 @@
 /* Scan linker error messages for missing template instantiations and provide
    them.
 
-   Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Jason Merrill (jason@cygnus.com).
 
 This file is part of GNU CC.
@@ -638,7 +638,11 @@ scan_linker_output (fname)
          else if (p = index (oldq, '"'), p)
            p++, q = index (p, '"');
 
-         if (q)
+         /* We need to check for certain error keywords here, or we would
+            mistakenly use GNU ld's "In function `foo':" message.  */
+         if (q && (strstr (oldq, "ndefined")
+                   || strstr (old, "nresolved")
+                   || strstr (oldq, "ultiple")))
            {
              *q = 0;
              dem = demangled_hash_lookup (p, false);