This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[C++ PATCH]: Fix bug 123

I've installed this patch for bug 123 where we find a COMPONENT_REF
inside a TEMPLATE_ID_EXPR during koenig lookup. Just process what's
being ref'd.

built & tested on i686-pc-linux-gnu, approved by Mark


Dr Nathan Sidwell   ::   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?' : :
2000-08-18  Nathan Sidwell  <>

	* decl2.c (arg_assoc): Deal with COMPONENT_REFs inside

Index: cp/decl2.c
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.387
diff -c -3 -p -r1.387 decl2.c
*** decl2.c	2000/08/18 09:49:06	1.387
--- decl2.c	2000/08/18 11:54:05
*************** arg_assoc (k, n)
*** 5042,5047 ****
--- 5042,5050 ----
        tree ctx;
        tree arg;
+       if (TREE_CODE (template) == COMPONENT_REF)
+         template = TREE_OPERAND (template, 1);
        /* First, the template.  There may actually be more than one if
  	 this is an overloaded function template.  But, in that case,
  	 we only need the first; all the functions will be in the same
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 18 Aug 2000 <>

// bug 123. We ICEd when koenig lookup found a COMPONENT_REF inside a

void foo(void (*f)());

struct A {
template <int s>
static void g();
template <int s>
void f();         // ERROR - candiate

static void f_plus ()
    foo (f<0>);   // ERROR - no match
    foo (g<0>);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]