3 ms·
The issue is calling xmas() in main before it's defined. Compiling with GCC on macOS gives the error: xmas.c:16:5: error: call to undeclared function 'xmas';
by ramesh31 3y ago
The issue is calling xmas() in main before it's defined. Compiling with GCC on macOS gives the error:
xmas.c:16:5: error: call to undeclared function 'xmas'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
xmas(2, 2, "");
Moving main() to the bottom compiles and executes with the proper output.
- lights0123 3y agoReal GCC or Apple’s clang symlinked to gcc?