]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
typeck.c (invalid_nonstatic_memfn_p): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 29 Jan 2009 17:02:52 +0000 (17:02 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 29 Jan 2009 17:02:52 +0000 (17:02 +0000)
2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>

* typeck.c (invalid_nonstatic_memfn_p): Use
DECL_NONSTATIC_MEMBER_FUNCTION_P.

From-SVN: r143761

gcc/cp/ChangeLog
gcc/cp/typeck.c

index ff63c619a7ae741a80ef66ee86537db93c0f7632..afa84bea4eb89cd78eaaac0b9b243850a081f9c7 100644 (file)
@@ -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
index 6c69256aa39976114ee76662e20462b87611adba..bca72ce452c333586027ba0b9a36e4f203b13ec1 100644 (file)
@@ -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");