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

Subversion Repositories openrisc

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

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-label" }
3
 
4
extern void f9();
5
 
6
void
7
f1()
8
{
9
 l1: f9();                              // { dg-warning "not used" }
10
 l3: ; f9();                            // { dg-warning "not used" }
11
 l4: __attribute__ ((unused)) ; f9();
12
}
13
 
14
void
15
f2()
16
{
17
 label: __attribute ((unused)) ;
18
}
19
 
20
void
21
f3()
22
{
23
  // The next line would be OK in C but is a syntax error in C++.
24
 l2: __attribute__ ((unused)) f9();     // { dg-error "expected" }
25
                // We still get an unused label warning--this is
26
                // optional and can be removed if it ever changes.
27
                // { dg-warning "not used" "expected" { target *-*-* } 24 }
28
}

powered by: WebSVN 2.1.0

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