re PR c++/18981 (ICE in cp_parser_lookup_name)
cp: PR c++/18981 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE flag setting. testsuite: PR 18981 * g++.dg/template/typename9.C: New test. From-SVN: r92184
This commit is contained in:
parent
eef5d0d1b9
commit
fe4c6b8feb
4 changed files with 26 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
PR c++/18981
|
||||
* parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
|
||||
flag setting.
|
||||
|
||||
2004-12-14 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/18738
|
||||
|
|
|
@ -14190,10 +14190,6 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
|
|||
is dependent. */
|
||||
type = make_typename_type (parser->scope, name, tag_type,
|
||||
/*complain=*/1);
|
||||
if (tag_type == enum_type)
|
||||
TYPENAME_IS_ENUM_P (type) = 1;
|
||||
else if (tag_type != typename_type)
|
||||
TYPENAME_IS_CLASS_P (type) = 1;
|
||||
decl = TYPE_NAME (type);
|
||||
}
|
||||
else if (is_template)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
PR 18981
|
||||
* g++.dg/template/typename9.C: New test.
|
||||
|
||||
2004-12-14 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/18738
|
||||
|
|
15
gcc/testsuite/g++.dg/template/typename9.C
Normal file
15
gcc/testsuite/g++.dg/template/typename9.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
// { dg-do compile }
|
||||
|
||||
// Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 14 Dec 2004 <nathan@codesourcery.com>
|
||||
|
||||
// PR 18981. ICE
|
||||
// Origin: Andreas Schwab <schwab@suse.de>
|
||||
|
||||
template <class T>
|
||||
struct tree {
|
||||
struct iterator;
|
||||
struct sibling_iterator {
|
||||
friend struct tree<T>::iterator;
|
||||
};
|
||||
};
|
Loading…
Add table
Reference in a new issue