diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b450775..562f945 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-06-14 Jason Merrill <jason@redhat.com> + + PR c++/53651 + * name-lookup.c (constructor_name_p): Don't try to look at the + name of a DECLTYPE_TYPE. + 2012-06-18 Lawrence Crowl <crowl@google.com> * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 0f28820..cc8439c 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -1966,6 +1966,11 @@ constructor_name_p (tree name, tree type) if (TREE_CODE (name) != IDENTIFIER_NODE) return false; + /* These don't have names. */ + if (TREE_CODE (type) == DECLTYPE_TYPE + || TREE_CODE (type) == TYPEOF_TYPE) + return false; + ctor_name = constructor_name_full (type); if (name == ctor_name) return true; |