I read some, for me, a kind of C-code, studying some examples in the book "Unix Software Environment" (1983).
As a curiosity, I wanted to know more about that, let me call it "style." The line below is interesting here.int main(argc, argv)
#include <stdio.h>
int main(argc, argv)
char *argv[];
{
printf("%s\n", argv[0]);
return 0;
}
In my research, I found that compiling the above code with flags -Wall -pedantic -ansiworks without any warnings and replaces -ansiwith a more recent one -std=c99(or c11, with gccand cc) warns only about argcthe default int.
I looked at the old C89 standard, trying to find links to this particular way of writing, but didn’t find anything on my own, so I put aside more knowledge of the team.
, , , , , ( ?)
user2590005