我正在使用最新版本的 TCC (tcc-0.9.26-win64-bin.zip)。由于某种原因,此代码的输出不是我所期望的(相同)。
#include <stdio.h>
struct CELL {
int row;
int col;
};
typedef struct CELL Cell;
Cell newCell(const int row, const int col) {
printf("Input %d %d\n", row, col);
Cell cell;
cell.row = row;
cell.col = col;
return cell;
}
int main(int argc, char *argv[]) {
Cell cell = newCell(2, 5);
printf("Output %d %d\n", cell.row, cell.col);
}
我运行脚本:
C:\tcc\tcc.exe -run D:\cell.c
它在eval中运行良好,所以我做错了什么?