Commit 287662c5 by Jason Merrill Committed by Jason Merrill

init.c (build_offset_ref): Don't mess with error_mark_node.

	* 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
parent 0d2a8b1b
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> 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
* decl.c (grokdeclarator): Allow anonymous types to be cv-qualified. * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
......
...@@ -1529,7 +1529,7 @@ build_offset_ref (type, name) ...@@ -1529,7 +1529,7 @@ build_offset_ref (type, name)
if (TREE_CODE (type) == NAMESPACE_DECL) if (TREE_CODE (type) == NAMESPACE_DECL)
{ {
t = lookup_namespace_name (type, name); t = lookup_namespace_name (type, name);
if (! type_unknown_p (t)) if (t != error_mark_node && ! type_unknown_p (t))
{ {
mark_used (t); mark_used (t);
t = convert_from_reference (t); t = convert_from_reference (t);
......
...@@ -3048,8 +3048,7 @@ do_scoped_id (token, parsing) ...@@ -3048,8 +3048,7 @@ do_scoped_id (token, parsing)
else else
{ {
if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node) if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node)
error ("undeclared variable `%s' (first use here)", cp_error ("`::%D' undeclared (first use here)", token);
IDENTIFIER_POINTER (token));
id = error_mark_node; id = error_mark_node;
/* Prevent repeated error messages. */ /* Prevent repeated error messages. */
SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node); SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);
......
...@@ -369,18 +369,6 @@ get_tinfo_fn (type) ...@@ -369,18 +369,6 @@ get_tinfo_fn (type)
DECL_MUTABLE_P (d) = 1; DECL_MUTABLE_P (d) = 1;
TREE_TYPE (name) = copy_to_permanent (type); 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); pushdecl_top_level (d);
make_function_rtl (d); make_function_rtl (d);
assemble_external (d); assemble_external (d);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment