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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [decl6.C] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do assemble  }
2
//
3
// Copyright (C) 1999 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 27 Sep 1999 
5
 
6
int j();
7
struct B {};
8
struct A
9
{
10
  friend explicit int j();    // { dg-error "" } only ctor decls can be explicit
11
  friend explicit B::B ();    // { dg-error "" } only ctor decls can be explicit
12
  int f(const);               // { dg-error "" } ansi forbids no type
13
  const k;                    // { dg-error "" } ansi forbids no type
14
  mutable friend int j1 ();   // { dg-error "" } non-member cannot be mutable
15
  mutable typedef int d;      // { dg-error "" } non-object cannot be mutable
16
  mutable int fn ();          // { dg-error "" } non-object cannot be mutable
17
  void fn (mutable int);      // { dg-error "" } non-member cannot be mutable
18
  mutable static int s;       // { dg-error "" } static cannot be mutable
19
  mutable const int s1;       // { dg-error "" } const cannot be mutable
20
  mutable const int *s2;      // ok
21
  mutable int *const s3;      // { dg-error "" } const cannot be mutable
22
  explicit A ();              // ok
23
};
24
mutable int g;                // { dg-error "" } non-member cannot be mutable
25
explicit A::A () {}           // { dg-error "" } only ctor decls can be explicit
26
 

powered by: WebSVN 2.1.0

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