diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0e8a75ab13b..09a9b4b74c1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 1998-07-19 Mark Mitchell + * decl.c (pushtag): Revert previous change. + * pt.c (lookup_template_class): Don't put out debugging + information for types that use template parameters. + * decl.c (pushtag): Don't put out debugging information for compiler-generated typedefs. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a55b28cd445..913b9abd00a 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2287,14 +2287,6 @@ pushtag (name, type, globalize) if (current_lang_name == lang_name_java) TYPE_FOR_JAVA (type) = 1; SET_DECL_ARTIFICIAL (d); - /* There's no reason to put out debugging information - for these declarations since they are - compiler-generated. Furthermore, if the type makes - use of template parameters, the code that generates - debugging information will get confused. It is safe - to put these out in the non-template case, just - useless. */ - DECL_IGNORED_P (d) = 1; if (! in_class) set_identifier_type_value_with_scope (name, type, b); } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ed23223d664..0f1dbdd8662 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3212,6 +3212,11 @@ lookup_template_class (d1, arglist, in_decl, context) && CLASSTYPE_INTERFACE_KNOWN (TREE_TYPE (template)) && ! CLASSTYPE_INTERFACE_ONLY (TREE_TYPE (template))) add_pending_template (t); + + if (uses_template_parms (arglist)) + /* If the type makes use of template parameters, the + code that generates debugging information will crash. */ + DECL_IGNORED_P (TYPE_STUB_DECL (t)) = 1; } return t;