News for hackers. Stuff that matters.
Re:What happens before main() is executed in C and why is it... by nitrogen on Saturday May 05, 2018 @01:10PM (#17002657)
Something surprising about C is that an empty argument list doesn't mean "no arguments", it means "unspecified arguments".

https://stackoverflow.com/questions/693788/is-it-better-to-u...

Though that is unlikely to be related to the arguments passed to main.

Re:What happens before main() is executed in C and why is it... by nineteen999 on Sunday May 06, 2018 @06:48PM (#17009073)
The C standard says arguments to main() should be defined as:

  int main(void)
or

  int main(int argc, char *argv[])

  (or equivalent, eg. int can be replaced by a typedef name 
  defined as int, or the type of argv can be written as
  char ** argv).
From http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 5.1.2.2.1: Program startup)

EDIT: apologies for the atrocious formatting, but it wasn't clear to me how to put two asterisks in a sequence here on HN without preformatted text.

Re:What happens before main() is executed in C and why is it... by JdeBP on Tuesday May 08, 2018 @06:21PM (#17025818)
It actually has a whole other half to the sentence, following the semi-colon.

* http://jdebp.eu./FGA/legality-of-void-main.html

Re:What happens before main() is executed in C and why is it... by nineteen999 on Tuesday May 15, 2018 @02:47AM (#17072112)
I took a detour at the footnote reference, and never came back. Interesting to note, thank you.