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
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr64280.C
blob
5c569e864b4c70a311292e8d1ca146b3f2f08067
1
// { dg-do compile }
2
3
class A
4
{
5
public:
6
A ();
7
};
8
class B
9
{
10
public:
11
B (int);
12
operator void *() { return m_fn1 () ? 0 : this; }
13
int m_fn1 ();
14
};
15
typedef int jmp_buf[];
16
struct C
17
{
18
jmp_buf cond_; // { dg-error "flexible array member" }
19
};
20
class F
21
{
22
C what_;
23
bool m_fn2 ();
24
};
25
int _setjmp (int[]);
26
void longjmp ();
27
class D
28
{
29
public:
30
D () { longjmp (); }
31
};
32
bool
33
F::m_fn2 ()
34
{
35
B a (0);
36
if (a)
37
if (_setjmp (what_.cond_))
38
return 0;
39
else
40
D ();
41
A b;
42
} // { dg-warning "control reaches end of non-void function" }