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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.oliva/] [typename2.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do assemble  }
2
// { dg-options "" }
3
 
4
// Copyright (C) 1999 Free Software Foundation
5
 
6
// by Alexandre Oliva 
7
// based on bug report by Nick Rasmussen 
8
 
9
// This is slightly different from typename1.C.  This one tests
10
// whether the implicit typename extension works.  gcc 2.95 reports:
11
 
12
// warning: lookup of `foo' finds `struct foo'
13
// warning:   instead of `baz::foo' from dependent base class
14
// warning:   (use `typename baz::foo' if that's what you meant)
15
 
16
// But baz::foo is not a base class, and `foo' should have been
17
// found in baz's scope.
18
 
19
struct foo;
20
 
21
template  struct bar {
22
  typedef int foo;
23
};
24
 
25
template  struct baz {
26
  typedef bar::foo foo; // { dg-error "" } implicit typename
27
  void m(foo);
28
};

powered by: WebSVN 2.1.0

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