repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
unreachable.c
blob
4f0169b8d0f80cde8b47eba1e0a3944d782b4310
1
/*
2
C2X unreachable
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c23
9
10
#include <stddef.h>
11
12
// todo: drop dis extra macro once we have c23 preprocessor support
13
#ifndef unreachable
14
#define unreachable __builtin_unreachable
15
#endif
16
17
volatile
int
i
;
18
19
void
f
(
void
)
20
{
21
if
(
i
)
22
unreachable
();
23
}
24
#endif
25
26
void
27
testUnreachable
(
void
)
28
{
29
#ifdef __SDCC
30
if
(
0
)
31
unreachable
();
32
f
();
33
#endif
34
}
35