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
tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wuninitialized-7.C
blob
6b056e942a8e00e5a2e39b387eee8a662f46daeb
1
// { dg-do compile }
2
// { dg-require-effective-target c++11 }
3
// { dg-options "-O -Wuninitialized" }
4
5
struct A {
6
A (int);
7
};
8
9
struct B: A {
10
const bool x = true;
11
12
B (): A (x ? 3 : 7) { } // { dg-warning "x. is used uninitialized" }
13
};
14
15
void f (void*);
16
void g ()
17
{
18
B b;
19
f (&b);
20
}