re PR c++/32519 (g++ allows access to protected template member functions of base...
authorFabien ChĂȘne <fabien.chene@gmail.com>
Wed, 5 Nov 2008 15:48:01 +0000 (10:48 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 5 Nov 2008 15:48:01 +0000 (10:48 -0500)
        PR c++/35219
        * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
        functions.

From-SVN: r141612

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/testsuite/ChangeLog

index 3b4f8b17aa7bc2319f45e0321c1d6ded9f628a2c..55a81ec3f4f60189990bca394dbe6ecb85d2acb2 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-05  Fabien Chene <fabien.chene@gmail.com>
+
+       PR c++/35219
+       * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
+       functions.
+
 2008-11-05  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/37742
index 7ff5824180a7ed83df32dd383fe2f4d8d55c93ae..b79b819f592a52205697f8916a7940fea5ad042e 100644 (file)
@@ -1978,8 +1978,7 @@ struct lang_decl GTY(())
 
 /* Nonzero for a DECL means that this member is a non-static member.  */
 #define DECL_NONSTATIC_MEMBER_P(NODE)          \
-  ((TREE_CODE (NODE) == FUNCTION_DECL          \
-    && DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE))        \
+  (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE)     \
    || TREE_CODE (NODE) == FIELD_DECL)
 
 /* Nonzero for _DECL means that this member object type
index 79811bd34e362cb6e73650cb7b44a7bf8932ed06..1049f5f50a65dac15d2ac74ff8ff16433526a5dc 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-05  Fabien Chene <fabien.chene@gmail.com>
+
+       PR c++/32519
+       * g++.dg/template/pr32519.C: New test.
+
 2008-11-05  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/37742