]> gcc.gnu.org Git - gcc.git/commitdiff
(dbxout_symbol): Distinguish implicit C++ typedefs
authorRichard Stallman <rms@gnu.org>
Mon, 27 Jul 1992 04:09:09 +0000 (04:09 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 27 Jul 1992 04:09:09 +0000 (04:09 +0000)
from explicit C typedefs for structs, using DECL_SOURCE_LINE.

From-SVN: r1690

gcc/dbxout.c

index a39f6515fdb4f56d3540c835903e8a89327ee08e..5f9e4b5d2b54282ac0e475c426ae58579cb69911 100644 (file)
@@ -1413,14 +1413,15 @@ dbxout_symbol (decl, local)
            /* Handle the case of a C++ structure or union
               where the TYPE_NAME is a TYPE_DECL
               which gives both a typedef name and a tag.  */
-           /* dbx requires the tag first and the typedef second.
-              ??? there is a bug here.  It generates spurious tags
-              for C code.  */
+           /* dbx requires the tag first and the typedef second.  */
            if ((TREE_CODE (type) == RECORD_TYPE
                 || TREE_CODE (type) == UNION_TYPE)
                && TYPE_NAME (type) == decl
                && !(use_gnu_debug_info_extensions && have_used_extensions)
-               && !TREE_ASM_WRITTEN (TYPE_NAME (type)))
+               && !TREE_ASM_WRITTEN (TYPE_NAME (type))
+               /* Distinguish the implicit typedefs of C++
+                  from explicit ones that might be found in C.  */
+               && DECL_SOURCE_LINE (decl) == 0)
              {
                tree name = TYPE_NAME (type);
                if (TREE_CODE (name) == TYPE_DECL)
This page took 0.092461 seconds and 5 git commands to generate.