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-9.C
blob
bf3514c40acf9ab05efb8fca6ef13d2d4cbd55e8
1
// PR c++/90691
2
// { dg-do compile { target c++11 } }
3
// { dg-additional-options -Wsign-compare }
4
5
struct S {
6
int a;
7
8
constexpr S();
9
explicit constexpr S(int a_) : a(a_) {}
10
};
11
12
constexpr S b = S(12);
13
14
template <const S& e>
15
bool c(unsigned int d) {
16
return d >= e.a;
17
}
18
19
bool test(unsigned int d);
20
bool test(unsigned int d) {
21
return c<b>(d);
22
}