decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc which causes errors...
authorPer Bothner <pbothner@apple.com>
Fri, 25 Jul 2003 04:04:30 +0000 (04:04 +0000)
committerPer Bothner <bothner@gcc.gnu.org>
Fri, 25 Jul 2003 04:04:30 +0000 (21:04 -0700)
* decl.c (pushdecl_class_level):   Don't use push_srcloc/pop_srcloc
which causes errors messages to incorrectly mention included files.

From-SVN: r69771

gcc/cp/ChangeLog
gcc/cp/decl.c

index a4e454bf814075e122c0fbbec31e159177107dfa..7abf46ba693db855305cfa5b411c3ac77fec3e5b 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.h (convert_to_base_statically): Declare.
index 4443d70d400876a6587052dad1605b37c126f73e..cec42f377700013c9f431c1407a76c9839ac744a 100644 (file)
@@ -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);