projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
indentation fixed
[libfirm]
/
ir
/
be
/
test
/
fehler52.c
1
#include <stdio.h>
2
#include <stdarg.h>
3
#include <stdlib.h>
4
5
union foo {
6
float blop;
7
int bla;
8
struct {
9
int a, b, c;
10
} jup;
11
const char *str;
12
};
13
14
typedef union foo *tree;
15
16
enum bla {
17
BLA_1,
18
BLA_2,
19
BLA_3,
20
BLA_4
21
};
22
23
const char* foo(enum bla type, tree dummy, ...) {
24
va_list ap;
25
const char *s1;
26
27
va_start(ap, dummy);
28
s1 = va_arg(ap, const char*);
29
va_end(ap);
30
31
return s1;
32
}
33
34
union foo bla = { .str = "bla" };
35
36
int main()
37
{
38
const char *res = foo(BLA_2, &bla, "everything ok");
39
puts(res);
40
return 0;
41
}