repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
Wunused-local-typedefs.c
blob
683019d72e11d06dfb631a271cc0320760d66624
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
}