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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [16077.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// 981203 bkoz
3
// g++/16077
4
// { dg-options "-Wconversion" }
5
 
6
class nicaragua;
7
struct colombia {
8
   colombia();
9
   colombia(const colombia &);
10
   colombia(const nicaragua &);
11
   colombia &operator= (const colombia&);
12
};
13
 
14
struct nicaragua {
15
public:
16
   nicaragua();
17
   nicaragua(const nicaragua&);
18
   operator colombia();
19
};
20
 
21
void peace(const colombia&);
22
 
23
void foo(nicaragua& b) {
24
  peace(b); // { dg-warning "choosing 'nicaragua::operator" "nic" }
25
  // { dg-warning "conversion" "conv" { target *-*-* } 24 }
26
  // { dg-message "note" "note" { target *-*-* } 24 }
27
}
28
 
29
 
30
 
31
 

powered by: WebSVN 2.1.0

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