forked from Leffmann/vbcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.c
90 lines (87 loc) · 2.69 KB
/
vars.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* $VER: vbcc (vars.c) V0.9 */
#include "vbc.h"
#ifdef AMIGA
static const char *__ver="$VER: vbcc 0.9f (28.03.2017)\r\n";
long __stack=65536;
#endif
char *s,*ident;
char number[MAXI],buff[MAXI];
struct tunit *first_tunit,*last_tunit;
struct struct_declaration *first_sd[MAXN],*last_sd[MAXN],*merk_sdf,*merk_sdl;
struct struct_identifier *first_si[MAXN],*last_si[MAXN],*merk_sif,*merk_sil;
struct identifier_list *first_ilist[MAXN],*last_ilist[MAXN],*merk_ilistf,*merk_ilistl;
struct llist *first_llist,*last_llist;
int nesting;
struct Var *first_var[MAXN],*last_var[MAXN],*merk_varf,*merk_varl,*first_ext,*last_ext;
struct Var *block_vla[MAXN];
struct llist *vladeflabels[MAXN],*vlajmplabels[MAXN];
struct vlaadjust_list *vlaadjusts[MAXN];
struct rpair rp;
FILE *out,*ic1,*ic2,*ppout,*cmdfile;
int c99;
int opencl;
int disallow_statics;
int header_cnt;
int wpo,wpo_key;
FILE *input_wpo;
int nocode,dontdelete;
int const_expr,for_decl;
int registerpri=200,currentpri,looppri=10;
int return_value,break_label,switch_typ,switch_count,switch_act;
int pointer_call;
int softfloat;
int ecpp;
struct Typ *return_typ;
struct Var *return_var;
zmax local_offset[MAXN];
int c_flags[MAXCF]={
VALFLAG,STRINGFLAG,0,0,
VALFLAG,0,0,0,
VALFLAG,FUNCFLAG,FUNCFLAG,VALFLAG,
VALFLAG,0,0,0,
0,0,0,0,
0,0,0,0,0,
VALFLAG,0,0,0,0,
0,VALFLAG,0,0,0,STRINGFLAG,0,
VALFLAG,VALFLAG,0,VALFLAG,0,
FUNCFLAG,FUNCFLAG,FUNCFLAG,0,
0,0,0,0,
0,0,0
};
char *c_flags_name[MAXCF]={
"O","o","ic1","ic2",
"debug","noasm","quiet","ansi",
"maxerrors","dontwarn","warn","maxoptpasses",
"inline-size","+","cpp-comments","no-trigraphs",
"no-inline-peephole","final","E","dontkeep-initialized-data",
"strip-path","fp-associative","iso","no-alias-opt","no-multiple-ccs",
"unroll-size","double-push","speed","size","unroll-all",
"stack-check","inline-depth","g","c99","wpo","cmd","noitra",
"misra","coloring","dmalloc","disable","soft-float",
"misrawarn","misradontwarn","reserve-reg","ecpp",
"short-push","unsigned-char","opencl","no-include-stack",
"deps","deps-for-libs","no-cpp-warn"
};
union ppi c_flags_val[MAXCF];
char *inname;
char **target_macros;
struct Var *regsbuf[MAXR+1];
int regbnesting[MAXR+1];
struct const_list *first_clist,*last_clist;
int afterlabel;
struct err_out err_out[]={
#include "errors.h"
"",0
};
int err_num=sizeof(err_out)/sizeof(struct err_out)-1;
struct misra_err_out misra_err_out[]={
#include "misra_errors.h"
0,0,"",0
};
#ifdef HAVE_ECPP
struct struct_declaration *current_class=0;
struct Typ *current_func=0;
struct ecpp_dtor_list *ecpp_dlist[MAXN];
#endif
char *cur_func="shouldn't happen!";
char *copyright="vbcc V0.9f (c) in 1995-2017 by Volker Barthelmann";