repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wsign-compare-7.C
blob
51f13f6f953cd279b0800feb860fc379d3e5645f
1
// PR c++/59231
2
// { dg-options "-Wsign-compare" }
3
4
template<class X, class Y>
5
bool equals(X x, Y y)
6
{
7
return (x == y); // { dg-warning "signed" }
8
}
9
10
int main()
11
{
12
unsigned long x = 2;
13
signed int y = 2;
14
15
if(!equals (x, y))
16
return 1;
17
return 0;
18
}