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
c++: prvalue of array type [PR111286]
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
Wlogical-op-2.c
blob
5d8a3fcd91da61d4961661fd5074914643f75b1e
1
/* PR c/80525 */
2
/* { dg-do compile } */
3
/* { dg-options "-Wlogical-op" } */
4
5
int
6
fn
(
int
a
,
int
b
)
7
{
8
if
((
a
+
1
) && (
a
+
1
))
/* { dg-warning "logical .and. of equal expressions" } */
9
return
a
;
10
if
((
a
+
1
) || (
a
+
1
))
/* { dg-warning "logical .or. of equal expressions" } */
11
return
b
;
12
return
-
1
;
13
}