Is there a small version of GCC for shipping with Windows program? Because Mingw installation takes frigging gigabyte, including a lot of bloat, like C++ and fortran compiler, with useless crap, like directx bindings.
Name:
Anonymous2016-09-16 1:06
The following code prints garbage and segfaults when compiled with TCC on Windows, but works fine with at least one version of MinGW-64 GCC.
#include <stdio.h>
typedef struct meme { int hax; char anus; } meme;
meme mememaker(int n, char c) { meme ameme; ameme.hax = n; ameme.anus = c; return ameme; }
Returning a struct from a function doesn't seem common practice anyhow, more common is to return a pointer to malloc'd storage. And it makes me wonder, a function can't return an array, but if a function can return a struct, can it just return a struct containing nothing but an array? Seems inconsistent to me.