OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [template/] [dependent-name5.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// PR c++/9634, c++/29469, c++/29607
// PR c++/9634, c++/29469, c++/29607
// Contributed by: Giovanni Bajo 
// Contributed by: Giovanni Bajo 
// DR224: Make sure that a name is *truly* semantically dependent.
// DR224: Make sure that a name is *truly* semantically dependent.
struct D {
struct D {
  typedef int K;
  typedef int K;
};
};
template 
template 
struct A
struct A
{
{
  typedef int Bar;
  typedef int Bar;
  template 
  template 
  struct N {};
  struct N {};
  typedef Bar          type1;
  typedef Bar          type1;
  typedef A::Bar       type2;
  typedef A::Bar       type2;
  typedef A::Bar    type3;
  typedef A::Bar    type3;
  typedef A::Bar    type4;  // { dg-error "" }
  typedef A::Bar    type4;  // { dg-error "" }
  typedef typename A::Bar type5;
  typedef typename A::Bar type5;
  typedef N       type6;
  typedef N       type6;
  typedef A::N    type7;
  typedef A::N    type7;
  typedef A::N type8;
  typedef A::N type8;
  typedef A::template N type9;  // { dg-error "" }
  typedef A::template N type9;  // { dg-error "" }
  typedef typename A::template N type10;
  typedef typename A::template N type10;
  typedef D Bar2;
  typedef D Bar2;
  struct N2 { typedef int K; };
  struct N2 { typedef int K; };
  // Check that A::N2 is still considered dependent (because it
  // Check that A::N2 is still considered dependent (because it
  //  could be specialized), while A::Bar2 (being just ::D) is not.
  //  could be specialized), while A::Bar2 (being just ::D) is not.
  typedef A::Bar2 type11;
  typedef A::Bar2 type11;
  typedef type11::K k3;
  typedef type11::K k3;
  typedef A::N2 type12;
  typedef A::N2 type12;
  typedef typename type12::K k2;
  typedef typename type12::K k2;
  typedef type12::K k1;  // { dg-error "" }
  typedef type12::K k1;  // { dg-error "" }
  // Check that A::Bar2 is not considered dependent even if we use
  // Check that A::Bar2 is not considered dependent even if we use
  // the typename keyword.
  // the typename keyword.
  typedef typename A::Bar2 type13;
  typedef typename A::Bar2 type13;
  typedef type13::K k4;
  typedef type13::K k4;
};
};
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.