diff options
| author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-27 14:46:55 +0000 |
|---|---|---|
| committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-27 14:46:55 +0000 |
| commit | d5a53e9508642dfc645926a113b47498e41e79eb (patch) | |
| tree | a4d0fd6f8e7416e581676a3c79caa9c01566e62f | |
| parent | f7cfa235d2845ef6121c3ca2766d195c4d974dbf (diff) | |
| download | ppe42-gcc-d5a53e9508642dfc645926a113b47498e41e79eb.tar.gz ppe42-gcc-d5a53e9508642dfc645926a113b47498e41e79eb.zip | |
PR c++/17585
* semantics.c (finish_id_expression): Do not add "this->" to
static member functions.
PR c++/17585
* g++.dg/template/static8.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88174 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/semantics.c | 2 | ||||
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/template/static8.C | 8 |
4 files changed, 20 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a18a1fb4730..34faa4789c5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-09-27 Mark Mitchell <mark@codesourcery.com> + + PR c++/17585 + * semantics.c (finish_id_expression): Do not add "this->" to + static member functions. + 2004-09-27 Nathan Sidwell <nathan@codesourcery.com> PR c++/17681 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 53c4cc37f02..d966f284c13 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2646,7 +2646,7 @@ finish_id_expression (tree id_expression, mark_used (first_fn); if (TREE_CODE (first_fn) == FUNCTION_DECL - && DECL_FUNCTION_MEMBER_P (first_fn)) + && DECL_NONSTATIC_MEMBER_FUNCTION_P (first_fn)) { /* A set of member functions. */ decl = maybe_dummy_object (DECL_CONTEXT (first_fn), 0); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a2242d61858..36f51a14b95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-09-27 Mark Mitchell <mark@codesourcery.com> + + PR c++/17585 + * g++.dg/template/static8.C: New test. + 2004-09-27 Nathan Sidwell <nathan@codesourcery.com> PR c++/17681 diff --git a/gcc/testsuite/g++.dg/template/static8.C b/gcc/testsuite/g++.dg/template/static8.C new file mode 100644 index 00000000000..f8229fd827e --- /dev/null +++ b/gcc/testsuite/g++.dg/template/static8.C @@ -0,0 +1,8 @@ +// PR c++/17585 + +template <void (*p)(void)> struct S03 {}; +class C03 { +public: + static void f(void) {} + void g(void) { S03<&f> s03; } +}; |

