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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [parse/] [constant2.C] - Blame information for rev 844

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
// Origin: 
3
// PR c++/10750: error when using a static const member initialized
4
//  with a dependent expression as constant-expression
5
 
6
struct A
7
{
8
  enum { a = 42 };
9
};
10
 
11
template 
12
struct B
13
{
14
  static const int b = Q::a;
15
};
16
 
17
template  class P>
18
struct C
19
{
20
  static const bool a = T::a;
21
  static const bool a_ = a;
22
  static const bool b = P::b;
23
  static const bool b_ = b;
24
  static const int c = sizeof(T);
25
  static const int c_ = c;
26
};
27
 
28
template struct C;

powered by: WebSVN 2.1.0

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