aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
Diffstat (limited to 'odb')
-rw-r--r--odb/context.cxx2
-rw-r--r--odb/parser.cxx8
2 files changed, 4 insertions, 6 deletions
diff --git a/odb/context.cxx b/odb/context.cxx
index f0a169e..9b8cb3c 100644
--- a/odb/context.cxx
+++ b/odb/context.cxx
@@ -1721,9 +1721,7 @@ find (semantics::type& t, semantics::names* hint)
// interested in, go into nested hints.
//
for (; hint != 0 && i == e; hint = hint->hint ())
- {
i = base::find (t.fq_name (hint));
- }
// If the hinted name didn't work, try the primary name (e.g.,
// ::std::string) instead of a user typedef (e.g., my_string).
diff --git a/odb/parser.cxx b/odb/parser.cxx
index 3bf2832..14dd81a 100644
--- a/odb/parser.cxx
+++ b/odb/parser.cxx
@@ -1128,8 +1128,6 @@ emit_type_decl (tree decl)
// class typedef case described above since we already used
// this name to define the class.
//
- int tc (TREE_CODE (t));
-
if ((tc == RECORD_TYPE || tc == UNION_TYPE || tc == ENUMERAL_TYPE) &&
TYPE_NAME (TYPE_MAIN_VARIANT (t)) == decl)
return 0;
@@ -1155,8 +1153,10 @@ emit_type_decl (tree decl)
// typedef foo bar;
// typedef bar foo;
//
- if (unit_->find_hint (t) == 0)
- unit_->insert_hint (t, edge);
+ // GCC also appears to re-purpose a node for another name (not
+ // sure if its a bug or a feature), so use the latest seen name.
+ //
+ unit_->insert_hint (t, edge);
if (trace)
{