OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2013-07-08 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
c-c++-common
/
Wunused-local-typedefs.c
1
/* Origin PR c++/33255
2
{ dg-options "-Wunused-local-typedefs" }
3
{ dg-do compile }
4
*/
5
6
void
7
test_warn ()
8
{
9
typedef int foo; // { dg-warning "locally defined but not used" }
10
}
11
12
void
13
test0 ()
14
{
15
typedef int foo;
16
foo var __attribute__((unused));
17
}
18
19
void
20
test1 ()
21
{
22
typedef int foo;
23
const foo *var = 0;
24
}
25
26
void
27
test2 ()
28
{
29
typedef int foo;
30
void func(foo);
31
}
32
33
void
34
test7 (void)
35
{
36
typedef int foo;
37
int vec[1] = {sizeof (foo)};
38
}
39
40
void
41
test8 (void)
42
{
43
typedef int foo __attribute__((used));
44
}