[ ... ]
Using void main() does not alter the behavior of any well-formed program and the
compilers all have debuggers which recognize void main() as ISO compliant and
well-formed.
You're getting things entirely backwards: they're talking about the
requirements on the _implementation_. Anybody with an IQ above room
temperature (which apparently doesn't include you) realizes that what
you do in your program can't possibly affect what the compiler does with
other programs. Likewise, a debugger has nothing to do with any of this
at all -- your even mentioning it shows nothing more than the abysmal
depths of your ignorance of programming general.
No properly functioning compiler will "recognize void main() as ISO
compliant and well-formed". First of all, the ISO standard explicitly
states that conformance applies ONLY to implementations, NOT the your
source code. Second, as mentioned above, a conforming implementation
may accept your code, but (when run in conforming mode, of course) must
provide a diagnostic for it -- in the case of gcc, that's an error
message. In the case of MS, the "conforming mode" (or the closest it
has anyway) would be when it diagnoses a void return from main -- which
it can and will do.
None of this, however, changes the fact that none of the compilers
you've mentioned is (even close to) conforming. Therefore, the fact
that they have some mode in which they accept your code means absolutely
_nothing_ about the code being well-formed. The standard says it's not
well-formed, so it's not. As mentioned above, the standard also says
that a conforming implementation can reject it, OR it can accept it --
but even if it does accept the code, the compiler must issue a
diagnostic.
I realize that you have a vested interest in not looking like an idiot,
but you're honestly not helping your cause this way: you long ago hit
what most would have considered rock bottom -- you don't need to prove
that you CAN dig yourself in even deeper.
[ ... ]
We aren't talking about whether the code is correct here, but whether it is ISO
compliant.
The correct word is "conforming" not "compliant". It's a meaningless
term in this case though: the standard specifically states that its
requirements are only on implementations, not on source code. Even when
a requirement looks like it's on source code, it's still really a
requirement on the implementation, about accepting, rejecting,
diagnosing, etc.., that particular input.
A term that is meaningful about source code, however, is well-formed.
Your's is not. Therefore, a conforming implementation is not obliged to
accept that source code. If a conforming implementation does accept the
source code, a diagnostic must still be issued.
You have tested the code with a number of compilers, and they've
(apparently) accepted the code without diagnostics. This proves only
that, at least as you've run them, those compilers are not conforming
implementations of C++.
That's not news though: first of all, every compiler on the planet but
one is _known_ with certainty (by those of us who have a clue) to be
non-conforming (Comeau C++ is the _sole_ exception that might be a
conforming implementation of C++).
Second, even when you use a compiler that's _capable_ of conforming,
that doesn't mean it always conforms -- Comeau C++ has a number of
switches to allow it to operate in non-conforming modes so it will
accept code that's written (for example) for various other non-
conforming implementations.