This is the mail archive of the gcc@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]

Re: g++.old-deja/g++.other/anon7.C


Mark Mitchell wrote:

Since your patch caused this regression,

That is rather arguable - my patch incorrectly *hid* a bug in pushdecl_class_level. A rather unusual case, admittedly.


would you please prepare and
test a patch to fix the problem?

Well, here's an attached patch. It's hard for me to interpret the 'make check' output because of the many failures. I noticed this regression from a last time I ran the testsuite:


FAIL: g++.dg/ext/packed2.C (test for excess errors)
Excess errors:
/home/bothner/GNU/gcc.head/gcc/testsuite/g++.dg/ext/packed2.C:18: warning: ignoring packed attribute on unpacked non-POD field `A B::a'


I'm assuming this is an unrelated regression.
--
	--Per Bothner
per@bothner.com   pbothner@apple.com  http://per.bothner.com/
2003-07-24  Per Bothner  <pbothner@apple.com>

	* decl.c (pushdecl_class_level):   Don't use push_srcloc/pop_srcloc
	which causes errors messages to incorrectly mention included files.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1097
diff -u -p -r1.1097 decl.c
--- decl.c	24 Jul 2003 12:56:34 -0000	1.1097
+++ decl.c	24 Jul 2003 19:36:59 -0000
@@ -4209,10 +4209,11 @@ pushdecl_class_level (tree x)
 
       for (f = TYPE_FIELDS (TREE_TYPE (x)); f; f = TREE_CHAIN (f))
 	{
-	  push_srcloc (DECL_SOURCE_FILE (f), DECL_SOURCE_LINE (f));
+	  location_t save_location = input_location;
+	  input_location = DECL_SOURCE_LOCATION (f);
 	  if (!pushdecl_class_level (f))
 	    is_valid = false;
-	  pop_srcloc ();
+	  input_location = save_location;
 	}
     }
   timevar_pop (TV_NAME_LOOKUP);

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