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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wunused-4.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-Wunused-parameter" }
3
 
4
// Copyright (C) 2003 Free Software Foundation, Inc.
5
// Contributed by Nathan Sidwell 15 Sep 2003 
6
// Origin: yotamm@mellanox.co.il
7
 
8
 
9
// PR c++/9848. Missing warning
10
 
11
struct C1 {
12
  // Only use in-charge ctor
13
  C1(int bi) {}  // { dg-warning "unused parameter" "" }
14
};
15
struct C2 {
16
  // Only use base ctor
17
  C2(int bi) {}  // { dg-warning "unused parameter" "" }
18
};
19
 
20
struct D : C2
21
{
22
  D (int) : C2 (1) {}
23
};
24
 
25
void show_compile_warning ()
26
{
27
  C1 c1 (1);
28
 
29
  D d (1);
30
}

powered by: WebSVN 2.1.0

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