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
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
Wcxx-compat-18.c
blob
9ae2d770a4ce6dc07834e307ebf8b3e13b41bf87
1
/* { dg-do compile } */
2
/* { dg-options "-Wc++-compat" } */
3
enum
E1
{
A
};
4
enum
E2
{
B
};
5
int
6
f1
(
int
i
)
7
{
8
return
(
int
) (
i
?
A
:
B
);
/* { dg-warning "invalid in C\[+\]\[+\]" } */
9
}
10
extern
enum
E1
f2
();
11
int
12
f3
(
int
i
)
13
{
14
return
(
int
) (
i
?
f2
() :
B
);
/* { dg-warning "invalid in C\[+\]\[+\]" } */
15
}