I'm using the latest version of TCC (tcc-0.9.26-win64-bin.zip). For some reason the output of this code is not what I'm expecting (the same).
#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);
}
I run the script with:
C:\tcc\tcc.exe -run D:\cell.c
It works fine in eval so what am I doing wrong?