* symfile.c (deduce_language_from_filename): Accept .cxx for C++.
authorJim Kingdon <jkingdon@engr.sgi.com>
Tue, 21 Sep 1993 17:41:45 +0000 (17:41 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Tue, 21 Sep 1993 17:41:45 +0000 (17:41 +0000)
* buildsym.c (start_subfile): Use deduce_language_from_filename
rather than checking for .C or .cc ourself.

gdb/ChangeLog
gdb/buildsym.c

index cf38587d95569cb5f89aec4b811b7a4858890fbf..5cfd6ea697f8a0bf0a5ff4a5156a3a97ee5dabee 100644 (file)
@@ -1,3 +1,9 @@
+Tue Sep 21 11:44:00 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+       * symfile.c (deduce_language_from_filename): Accept .cxx for C++.
+       * buildsym.c (start_subfile): Use deduce_language_from_filename
+       rather than checking for .C or .cc ourself.
+
 Mon Sep 20 14:53:11 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
        * defs.h: Declare argument of re_comp as const char *.
index e8804cb57b39ebe85acd045bac7144d5d083d127..5a762af2bff88f4b356ee18c1b41d2571b182530 100644 (file)
@@ -422,18 +422,15 @@ start_subfile (name, dirname)
      directives which specify a file name ending in .C.
 
      So if the filename of this subfile ends in .C, then change the language
-     of any pending subfiles from C to C++.  .cc is also accepted, even
-     though I don't think cfront allows it.  */
+     of any pending subfiles from C to C++.  We also accept any other C++
+     suffixes accepted by deduce_language_from_filename (in particular,
+     some people use .cxx with cfront).  */
 
   if (subfile->name)
     {
-      char *p;
       struct subfile *s;
 
-      p = strrchr (subfile->name, '.');
-      if (p != NULL
-         && ((p[1] == 'C' && p[2] == '\0')
-             || (p[1] == 'c' && p[2] == 'c' && p[3] == '\0')))
+      if (deduce_language_from_filename (subfile->name) == language_cplus)
        for (s = subfiles; s != NULL; s = s->next)
          if (s->language == language_c)
            s->language = language_cplus;
This page took 0.027916 seconds and 4 git commands to generate.