最新バージョンの 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で問題なく動作するので、何が間違っているのでしょうか?