X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fcp%2Fparser.c;h=cdb524e2f0334fa831572246429330799daf7c64;hp=fa82cf2c823c7e33164f04821925f462c9781a50;hb=fa263651e479c397f5c62bce7f367561a3ff8dbb;hpb=6b1556ff248c61446130566be0eea14d5ab2344f diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index fa82cf2c823..cdb524e2f03 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -14035,12 +14035,14 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, typename_type, /*complain=*/tf_error); /* If the `typename' keyword is in effect and DECL is not a type - decl. Then type is non existant. */ + decl, then type is non existent. */ else if (tag_type == typename_type && TREE_CODE (decl) != TYPE_DECL) - type = NULL_TREE; - else - type = check_elaborated_type_specifier (tag_type, decl, + ; + else if (TREE_CODE (decl) == TYPE_DECL) + type = check_elaborated_type_specifier (tag_type, decl, /*allow_template_p=*/true); + else if (decl == error_mark_node) + type = error_mark_node; } if (!type)