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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [non-dependent2.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 16 Jul 2003 
5
 
6
// A non-dependent field_decl can bind at parse time.
7
 
8
template 
9
struct Foo {
10
  int j; // we never see this one.
11
  int k; // { dg-error "Foo" "" }
12
 
13
};
14
 
15
struct Baz
16
{
17
  int j;
18
  int k; // { dg-error "candidates" "" }
19
 
20
};
21
 
22
template 
23
struct Bar : public Foo, Baz {
24
 
25
  int baz () { return j; } // binds to Baz::j
26
  int foo () { return this->k; } // { dg-error "request for member" "" }
27
};
28
 
29
int main()
30
{
31
  Bar bar;
32
 
33
  bar.baz ();
34
  bar.foo (); // { dg-message "required" "" }
35
 
36
  return 0;
37
}

powered by: WebSVN 2.1.0

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