FIRE DRILL
Without referring to documentation or existing code, create a C program which displays "hello world" on its own line, and compiles without warnings or errors on the first try.
Compile with: gcc -Wall -o helloworld helloworld.c
@rey (I did C every day with extremely restrictive norms & standards for two years, for me it's like riding a bicycle at this point)
@Siphonay i'm usually quite far removed from main() so the args got me =^.^=
@rey we had to always compile with -Wall -Werror -Wextra -ansi -pedantic so when I used argv but not argc it looked like this:
int main(int __attribute__((unused)) ac, char **av)
@Siphonay does __attribute__((unused)) do what i think it does?
tempting, but ugly (but so is "/* workaround for gratuitous warning */" when you twiddle ac after the return)
@lifning @rey I don't know about this, but we had a line restriction (25 lines max per function) so using (void)var would just end up taking one more precious line for me, so it wasn't a good solution for me at the time. The unused attribute is supported in gcc and clang