init.c (build_offset_ref): Don't mess with error_mark_node.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 17 Aug 1998 16:29:17 +0000 (16:29 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 17 Aug 1998 16:29:17 +0000 (12:29 -0400)
* init.c (build_offset_ref): Don't mess with error_mark_node.
* lex.c (do_scoped_id): Use cp_error.
* rtti.c (get_tinfo_fn): Don't mess with the context for now.

From-SVN: r21792

gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/lex.c
gcc/cp/rtti.c

index 3f3fa49bf9b4ed19077dee191a1335ef2eec88f8..1379f0741c21added6aad49af693fc0a8a079bb7 100644 (file)
@@ -1,3 +1,10 @@
+1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * init.c (build_offset_ref): Don't mess with error_mark_node.
+       * lex.c (do_scoped_id): Use cp_error.
+
+       * rtti.c (get_tinfo_fn): Don't mess with the context for now.
+
 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
 
        * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
index 78b6c5d8cbadf3d7acd131981f6d0f0d860664cc..9d1e05b88a88994e29b89b2087a51b9017f8a0d3 100644 (file)
@@ -1529,7 +1529,7 @@ build_offset_ref (type, name)
   if (TREE_CODE (type) == NAMESPACE_DECL)
     {
       t = lookup_namespace_name (type, name);
-      if (! type_unknown_p (t))
+      if (t != error_mark_node && ! type_unknown_p (t))
        {
          mark_used (t);
          t = convert_from_reference (t);
index 3271965939027045c1134adbfe4dba56bce0edc8..2aae5b9f89f91b1672a206b1908d95704a87f329 100644 (file)
@@ -3048,8 +3048,7 @@ do_scoped_id (token, parsing)
       else
        {
          if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node)
-           error ("undeclared variable `%s' (first use here)",
-                  IDENTIFIER_POINTER (token));
+           cp_error ("`::%D' undeclared (first use here)", token);
          id = error_mark_node;
          /* Prevent repeated error messages.  */
          SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);
index a86d6ed3a7818cf4a27c12a6571d0ec2a0783cc7..0087bc394678a4399172d812e41468c1463b1d71 100644 (file)
@@ -369,18 +369,6 @@ get_tinfo_fn (type)
   DECL_MUTABLE_P (d) = 1;
   TREE_TYPE (name) = copy_to_permanent (type);
 
-  /* We set DECL_CONTEXT for the benefit of backend stuff that wants to
-     know what type this artificial function is associated with.  dllexport
-     handling, for instance.  This is a kludge, and the
-     DECL_NO_STATIC_CHAIN bit is necessary to keep local classes from
-     breaking.  The DECL_IGNORED_P bit keeps dwarf2 from breaking.  */
-  if (IS_AGGR_TYPE (type))
-    {
-      DECL_CONTEXT (d) = type;
-      DECL_NO_STATIC_CHAIN (d) = 1;
-      DECL_IGNORED_P (d) = 1;
-    }
-
   pushdecl_top_level (d);
   make_function_rtl (d);
   assemble_external (d);