From 90ef7773275cd355128818a0593d721f2a972cce Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 29 Jan 2009 17:02:52 +0000 Subject: [PATCH] typeck.c (invalid_nonstatic_memfn_p): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. 2009-01-29 Paolo Carlini * typeck.c (invalid_nonstatic_memfn_p): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. From-SVN: r143761 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/typeck.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ff63c619a7ae..afa84bea4eb8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2009-01-29 Paolo Carlini + + * typeck.c (invalid_nonstatic_memfn_p): Use + DECL_NONSTATIC_MEMBER_FUNCTION_P. + 2009-01-27 Paolo Carlini PR c++/37554 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 6c69256aa399..bca72ce452c3 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"); -- 2.47.2