From e4fd5b87bf37f1a58194897e10fae8132470f84a Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 7 Nov 2007 23:37:29 +0000 Subject: re PR c++/33045 ([c++0x] Incorrect decltype result for function calls.) 2007-11-07 Douglas Gregor PR c++/33045 PR c++/33837 PR c++/33838 * semantics.c (finish_decltype_type): See through INDIRECT_REFs. Be careful with ERROR_MARK_NODEs. * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL argument. 2007-11-07 Douglas Gregor PR c++/33045 PR c++/33837 PR c++/33838 * g++.dg/cpp0x/decltype-33837.C: New. * g++.dg/cpp0x/decltype-refbug.C: New. * g++.dg/cpp0x/decltype-33838.C: New. From-SVN: r129975 --- gcc/cp/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cp/parser.c') diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 23994b0..41cb26e 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -17858,7 +17858,7 @@ cp_parser_check_class_key (enum tag_types class_key, tree type) static void cp_parser_check_access_in_redeclaration (tree decl) { - if (!CLASS_TYPE_P (TREE_TYPE (decl))) + if (!decl || !CLASS_TYPE_P (TREE_TYPE (decl))) return; if ((TREE_PRIVATE (decl) -- cgit v1.1