aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ff63c61..afa84be 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * typeck.c (invalid_nonstatic_memfn_p): Use
+ DECL_NONSTATIC_MEMBER_FUNCTION_P.
+
2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37554
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 6c69256..bca72ce 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1,6 +1,6 @@
/* Build expressions with type checking for C++ compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
@@ -1494,7 +1494,7 @@ cxx_sizeof_or_alignof_expr (tree e, enum tree_code op, bool complain)
bool
invalid_nonstatic_memfn_p (const_tree expr, tsubst_flags_t complain)
{
- if (TREE_CODE (TREE_TYPE (expr)) == METHOD_TYPE)
+ if (DECL_NONSTATIC_MEMBER_FUNCTION_P (expr))
{
if (complain & tf_error)
error ("invalid use of non-static member function");