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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
c23-unreachable-1.c
blob
4cbe7f0d67d76138c4b7673958a485c6e096a6f1
1
/* Test unreachable in <stddef.h> for C23. */
2
/* { dg-do run } */
3
/* { dg-options "-std=c23 -pedantic-errors -O2" } */
4
5
#include <stddef.h>
6
7
#ifndef unreachable
8
#error
"unreachable not defined"
9
#endif
10
11
extern
void
*
p
;
12
extern
__typeof__
(
unreachable
()) *
p
;
13
14
volatile
int
x
=
1
;
15
16
extern
void
not_defined
(
void
);
17
18
extern
void
exit
(
int
);
19
20
int
21
main
()
22
{
23
if
(
x
==
2
)
24
{
25
unreachable
();
26
not_defined
();
27
}
28
exit
(
0
);
29
}