>Now, the thing that really boggles my mind is that while a non-int main()
>is specifically identified as illegal, no diagnostic message is
>required. This is self-defeating. Why make it illegal if you're not
>going to at least warn about, if not enforce it?
For the same reason that
#include <unistd.h>
does not require a diagnostic.
non-int main does not violate a constraint; it's "merely" undefined
behavior, like
i = ++i;
*(int *) 0 = 0;
{ int i;
++i;
}
and the like.
The intent is that implementors can extend things if they want. Or
to leave things open for other standards, such as POSIX.
Note the distinction between "long long", which is a syntax error and
requires a diagnostic, and '#include <unistd.h>' which is undefined and
doesn't. (Actually, it's somewhere on the fine line between undefined
and implementation defined; I'd need to look it up to be sure.)
-s
s