Commit d19e85e8 by Mark Mitchell Committed by Mark Mitchell

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
parent c81f61b2
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);
......
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
......
// PR c++/17585
template <void (*p)(void)> struct S03 {};
class C03 {
public:
static void f(void) {}
void g(void) { S03<&f> s03; }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment