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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wuninitializable-member-no.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
// Test disabling
2
// { dg-do compile }
3
// { dg-options "-Wall -Wextra -Wno-uninitialized" }
4
 
5
class X {
6
  int & flag;// { dg-bogus "non-static reference 'int& X::flag' in class without a constructor" }
7
public:
8
  void f(){ flag++ ; }
9
};
10
 
11
class Y {
12
  const int var;// { dg-bogus "non-static const member 'const int Y::var' in class without a constructor" }
13
public:
14
  int g(){ return 2*var; }
15
};

powered by: WebSVN 2.1.0

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