OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [qual1.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// { dg-options "-O" }
3
// Origin: Benjamin Pflugmann 
4
 
5
// DR 295 allows qualification via typedef
6
 
7
typedef const char *(func_type)();
8
 
9
class C
10
{
11
public:
12
  func_type *Function;
13
  // The following is DR 295 dependent
14
  const func_type* function(void) { return Function; }
15
  volatile func_type* functionv(void);
16
} action;
17
 
18
void work(const char *source)
19
{
20
  work( action.function()() );
21
}

powered by: WebSVN 2.1.0

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