repo.or.cz
/
tinycc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
riscv: Support $ in identifiers in extended asm.
[tinycc.git]
/
tests
/
bug.c
blob
b0bc2d54733b022a8a9942e2551fd77c78f8536a
1
#include <stdio.h>
2
#include <stdarg.h>
3
4
int
compile_errors
(
void
)
5
{
6
#if TEST == 1
7
{
8
/* Not constant */
9
static int
i
= (&
"Foobar"
[
1
] - &
"Foobar"
[
0
]);
10
}
11
#endif
12
#if TEST == 2
13
{
14
/* Not constant */
15
struct
{
int
c
;}
v
;
16
static long
i
=((
char
*)&(
v
.
c
)-(
char
*)&
v
);
17
}
18
#endif
19
#if TEST == 3
20
{
21
/* Not constant */
22
static const short
ar
[] = { &&
l1
- &&
l1
, &&
l2
- &&
l1
};
23
void
*
p
= &&
l1
+
ar
[
0
];
24
goto
*
p
;
25
l1
:
return
1
;
26
l2
:
return
2
;
27
}
28
#endif
29
return
0
;
30
}
31
32
int
33
main
(
void
)
34
{
35
}