aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-07-27 04:09:09 +0000
committerRichard Stallman <rms@gnu.org>1992-07-27 04:09:09 +0000
commitbed7dc7a9f5ed1ad3f65fd3e5438e69a9fcd251d (patch)
tree43bde2381af6463852ea46d2102a11902f0a9b07 /gcc/dbxout.c
parent65e15c1b208edf5addad113bad65fffd3269fcb0 (diff)
downloadgcc-bed7dc7a9f5ed1ad3f65fd3e5438e69a9fcd251d.zip
gcc-bed7dc7a9f5ed1ad3f65fd3e5438e69a9fcd251d.tar.gz
gcc-bed7dc7a9f5ed1ad3f65fd3e5438e69a9fcd251d.tar.bz2
(dbxout_symbol): Distinguish implicit C++ typedefs
from explicit C typedefs for structs, using DECL_SOURCE_LINE. From-SVN: r1690
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index a39f651..5f9e4b5 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -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)