tcc-0.9.26 :在网上看到《用C语言采取模拟DFA(确定性有限自动机)算法编写一个扫描器》将里面的代码编译报错

tcc-0.9.26 :在网上看到《用C语言采用模拟DFA(确定性有限自动机)算法编写一个扫描器》将里面的代码编译报错
在网上看到《用C语言采用模拟DFA(确定性有限自动机)算法编写一个扫描器》将里面的代码编译其中代码“int currentStateId = startStateId;”在编译时报错" initializer element is not constant "我将“int currentStateId = startStateId”改成了“int currentStateId = 0”后又发现“int statesTransStack[MAX_STACK_SIZE];”报错“constant expression expected"
请问这是什么原因啊?用的是tcc-0.9.26-win64-bin 按道理代码没有问题啊?
------解决方案--------------------
仅供参考
// 有如下字符串,分隔符是 '","' 即双引号逗号双引号,是3个字符,不是一个逗号,也就是逗号分隔双引号包含的CSV格式
// "123","ab,cd","GG"GG","你好","100","99987","","PPP"
// 双引号内也可能含有逗号和双引号
//
// 双引号内的内容表示字段,例子共8个字段,双引号内的内容可能什么也没有,比如倒数第二个字段
// 这8个字段的内容分别是 123   ab,cd   GG"GG  你好  100  99987 NULL  PPP
// 汉字编码是GBK,文件q.csv里面有两行"123","ab,cd","GG"GG","你好","100","99987","","PPP"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#define MAXF 100     //每行最多字段数
#define MAXC 20      //每字段最多字符数
#define MAXW 3000    //每行最多字符数
#define MAXL 1000000 //最多行数
wchar_t str[MAXW];
int s,i,n;
wchar_t c;
wchar_t d[MAXF][MAXC];
wchar_t *p;
FILE *f;
int ln;
int parse() {
    wprintf(L"第%d行:",ln+1);
    wprintf(L"%s\n",str);
    s=0;
    i=0;
    n=0;
    while (1) {
        c=str[i];
        switch (s) {
        case 0:
            if (c==0) goto SHOW;
            if (c==L'\"') {
                s=1;
                p=str+i+1;
            } else {
               fwprintf(stderr,L"第%d行第%d个字符处格式错误!期望双引号。\n",ln+1,i);
                return 1;
            }
        break;
        case 1:
            if (c==0) {
               fwprintf(stderr,L"第%d行第%d个字符处格式错误!期望双引号。\n",ln+1,i);
                return 1;
            }
            if (c==L'\"' && (str[i+1]==L',' 
------解决方案--------------------
 str[i+1]==0)) {
                if ((str+i)-p>MAXC-1) fwprintf(stderr,L"第%d行第%d个字段多于%d的字符被忽略。\n",ln+1,n+1,MAXC-1);
                wcsncpy(d[n],p,__min((str+i)-p,MAXC-1));d[n][MAXC-1]=0;
                n++;
                if (n>=MAXF) {
                   fwprintf(stderr,L"第%d行多于%d的字段被忽略。\n",ln+1,MAXF);
                    goto SHOW;
                }
                if (str[i+1]==0) goto SHOW;
                if (str[i+1]==L',') {
                    i++;
                    s=0;
                }
            }
        break;
        }
        i++;
    }
SHOW:
    wprintf(L"第%d行:",ln+1);
    wprintf(L"%d个字段",n);
    for (i=0;i<n;i++) {
        wprintf(L"[%s]",d[i]);
    }
    wprintf(L"\n");
    return 0;
}