What do you think of this argument that conforming programs may
declare main() as returning void?
http://homepages.tesco.net/~J.deBoynePollard/FGA/legality-of-void-main.html
I personally agree with the author that allowing any other than the
two traditional definitions of main() in a hosted environment is a
poor choice.
In a discussion on comp.std.c, one of the committee members came up
with (IMNSHO) a rather wishy-washy explanation. It was along the
lines that if an implementation chooses to document that it accepts
such definitions as:
void main()
char *main()
FILE *main()
....or whatever, it is not free to excuse itself from other
requirements of the standard for an otherwise strictly conforming
program.
On the other hand, some of the examples are just plain wrong in what
they imply.
Visual C++, for example, claims conformance with the C standard as of
1995, which did not allow any additional implementation-defined
signatures for main(). Despite the fact that they probably state
somewhere in their documentation that they accept "void main()" in
addition to "int main()", it is a non-standard extension of undefined
behavior. As far as the C standard is concerned, Visual C++ has no
requirements all to meet when it accepts a C program starting with
"void main()".