This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: Example of GCC 2.95 member templates letting me down


On Jul 20, 1999, Alexandre Oliva <oliva@dcc.unicamp.br> wrote:

> I'm installing an additional testcase for the ICE.  I'm not sure about 
> the parse error, should this be accepted?

Here's the testcase:

// Build don't link:

// Copyright (C) 1999 Free Software Foundation

// by Alexandre Oliva <oliva@dcc.unicamp.br>

struct B {
  int i;
};

template <class T> void foo(T b) {
  b.T::i; // ok
  // b.__typeof__(b)::i; // parse error, should this be accepted?
  typedef T t1;
  b.t1::i; // ok
  typedef __typeof__(b) t2;
  b.t2::i; // crash test - XFAIL *-*-*
}

template void foo(B); // not needed for the crash

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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