summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-18 15:54:22 +0000
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-18 15:54:22 +0000
commit3b91e7e73b4f25ca48ceea82eda283be597d986d (patch)
treebb256035baabb26b8721b836ce81c524c986d175 /gcc/cp/class.c
parent4aa80500cdf200ba3f124e52beb65ab74bd75d83 (diff)
downloadgcc-3b91e7e73b4f25ca48ceea82eda283be597d986d.tar.gz
PR c++/12932
* class.c (currently_open_derived_class): Check if current_class_type is NULL_TREE. * semantics.c (finish_call_expr): Check if currently_open_derived_class returns NULL_TREE. * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT parameter. * g++.dg/template/static5.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73705 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 300d8466a01..1e1b71c94dc 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5585,6 +5585,9 @@ currently_open_derived_class (tree t)
if (dependent_type_p (t))
return NULL_TREE;
+ if (!current_class_type)
+ return NULL_TREE;
+
if (DERIVED_FROM_P (t, current_class_type))
return current_class_type;