re PR c++/17585 (usage of unqualified name of static member from within class not allowed)
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. From-SVN: r88174
This commit is contained in:
parent
c81f61b250
commit
d19e85e886
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
8
gcc/testsuite/g++.dg/template/static8.C
Normal file
8
gcc/testsuite/g++.dg/template/static8.C
Normal file
@ -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; }
|
||||
};
|
Loading…
Reference in New Issue
Block a user