aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-09-17 20:52:41 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-09-17 20:52:41 +0000
commit47aa0df47504bd7a24c0e5e3110e927233e4a96d (patch)
treeb548787b45299cc7b303a1196b1877191302b679 /gcc/cp/decl.c
parent43892f8cea65404797f538f37a500ca62bf672c0 (diff)
downloadgcc-47aa0df47504bd7a24c0e5e3110e927233e4a96d.zip
gcc-47aa0df47504bd7a24c0e5e3110e927233e4a96d.tar.gz
gcc-47aa0df47504bd7a24c0e5e3110e927233e4a96d.tar.bz2
re PR debug/12066 (g++ generates stabs for "char *" that gdb cannot read)
PR debug/12066 * dbxout.c (dbxout_init): Use a langhook to find builtin types. * langhooks-def.h (lhd_return_null_tree_v): New function. (LANG_HOOKS_BUILTIN_TYPE_DECLS): New macro. (LANG_HOOKS_DECLS): Add it to the intializer. * langhooks.c (lhd_return_null_tree_v): New function. * langhooks.h (lang_hooks_for_decls): Add builtin_type_decls. PR debug/12066 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define. * cp-tree.h (cxx_builtin_type_decls): Declare. * decl.c (builtin_type_decls): New variables. (cxx_builtin_type_decls): New function. (record_builtin_type): Add to builtin_type_decls. From-SVN: r71478
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 92e8597..8676698 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5911,6 +5911,19 @@ lookup_type_current_level (tree name)
}
+
+/* A chain of TYPE_DECLs for the builtin types. */
+
+static GTY(()) tree builtin_type_decls;
+
+/* Return a chain of TYPE_DECLs for the builtin types. */
+
+tree
+cxx_builtin_type_decls ()
+{
+ return builtin_type_decls;
+}
+
/* Push the declarations of builtin types into the namespace.
RID_INDEX is the index of the builtin type in the array
RID_POINTERS. NAME is the name used when looking up the builtin
@@ -5952,6 +5965,12 @@ record_builtin_type (enum rid rid_index,
if (!TYPE_NAME (type))
TYPE_NAME (type) = tdecl;
+
+ if (tdecl)
+ {
+ TREE_CHAIN (tdecl) = builtin_type_decls;
+ builtin_type_decls = tdecl;
+ }
}
/* Record one of the standard Java types.