aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/name-lookup.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 036b25f..7e37b69 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,11 @@
2010-02-12 Jason Merrill <jason@redhat.com>
+ PR c++/43024
+ * name-lookup.h (current_binding_level): Check for null
+ cp_function_chain.
+
+2010-02-12 Jason Merrill <jason@redhat.com>
+
PR c++/43054
* tree.c (cp_tree_equal): Correct CALL_EXPR logic.
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index 7a3625a..0851481 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -259,7 +259,7 @@ struct GTY(()) cp_binding_level {
/* The binding level currently in effect. */
#define current_binding_level \
- (*(cfun && cp_function_chain->bindings \
+ (*(cfun && cp_function_chain && cp_function_chain->bindings \
? &cp_function_chain->bindings \
: &scope_chain->bindings))