0

我正在使用最新版本的 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中运行良好,所以我做错了什么?

4

1 回答 1

4

它在 eval 中运行良好,所以我做错了什么?

没有什么。使用 gcc 对我来说效果很好。

于 2016-02-22T21:23:08.083 回答