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 broken MinGW build of gcc.c
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wuninitialized-9.C
blob
3432b4f337fd53a87380e77324460c9466802ab5
1
// PR c++/80119
2
// { dg-do compile { target c++11 } }
3
// { dg-options "-Wuninitialized" }
4
5
#include <type_traits>
6
7
template <bool b>
8
void failing_function(std::integral_constant<bool, b>)
9
{
10
int i;
11
if (b && (i = 4)) {
12
++i; // { dg-bogus "may be used uninitialized" }
13
}
14
}
15
16
int main (void)
17
{
18
failing_function(std::false_type());
19
}