diff options
author | Douglas Gregor <doug.gregor@gmail.com> | 2007-11-07 23:37:29 +0000 |
---|---|---|
committer | Doug Gregor <dgregor@gcc.gnu.org> | 2007-11-07 23:37:29 +0000 |
commit | e4fd5b87bf37f1a58194897e10fae8132470f84a (patch) | |
tree | 574bfa372c1500897f79a6972c7271c01ea484be /gcc/cp/parser.c | |
parent | 4a54716a857f614647b249bc91345f58c18d2c68 (diff) | |
download | gcc-e4fd5b87bf37f1a58194897e10fae8132470f84a.zip gcc-e4fd5b87bf37f1a58194897e10fae8132470f84a.tar.gz gcc-e4fd5b87bf37f1a58194897e10fae8132470f84a.tar.bz2 |
re PR c++/33045 ([c++0x] Incorrect decltype result for function calls.)
2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
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 <doug.gregor@gmail.com>
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
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |