This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix c++/22514


 Hi,

  This fixes pr22514 by not trying to output debug information of an error has
already occured.  Bootstrapped and regtested on ia64-linux, ok for mainline?

-- 
Thanks,
Jim

http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim

2005-07-29  James A. Morrison  <phython@gcc.gnu.org>

	* name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
	sorrycount or errorcount are nonzero.

Index: name-lookup.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/name-lookup.c,v
retrieving revision 1.132
diff -u -p -r1.132 name-lookup.c
--- name-lookup.c	27 Jul 2005 18:31:36 -0000	1.132
+++ name-lookup.c	29 Jul 2005 06:21:21 -0000
@@ -4952,6 +4952,10 @@ pop_everything (void)
 void
 cp_emit_debug_info_for_using (tree t, tree context)
 {
+  /* Don't try to emit any debug information if we have errors.  */
+  if (sorrycount || errorcount)
+    return;
+
   /* Ignore this FUNCTION_DECL if it refers to a builtin declaration
      of a builtin function.  */
   if (TREE_CODE (t) == FUNCTION_DECL
/* { dg-do compile } */
namespace s
{
  template <int> struct _List_base
  {
     int _M_impl;
  };
  template<int i> struct list : _List_base<i>
  {
    using _List_base<i>::_M_impl;
  }
}  /* { dg-error "expected unqualified-id before '\}'" } */
s::list<1> OutputModuleListType;  /* { dg-error "expected" } */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]