Re: Practical applications on C++
* James Kanze:
I was under the impression that something only qualified as a
constraint violation if it were in a paragraph with the heading
"constraints" (but I could easily be wrong).
I also think that the most natural interpretation of the "[...];
or in some other implementation defined manner" in ?126.96.36.199.1/1
has it applying to the complete clause which precedes, including
the "defined with a return type of int", so that an
implementation can legally define a version of main which takes
a void (or a double, or a char const*) as a return value. (Note
the difference with respect to the C++ standard, which says "It
shall have a return type of type int, but otherwise its type is
implementation-defined." There's a big difference between "but
otherwise" and simply "or".
Summing up: when the standard is unclear it is unclear.
I think the only thing to conclude from that is that perhaps the C standard
could have been clarified a bit. If your interpretation should be correct, then
e.g. Bjarne Stroustrup would have to fix his FAQ, since he (with access to the
folks who created C) maintains that C never allowed 'int main'. Interestingly,
in one thread in this group long ago, when I mentioned off-hand that he'd used
'void main' in second edition of TCPPPL, I think it was, he joined in and
couldn't believe that and asked for reference (which I gave). He he. As I recall
he also corrected my "nobody's prefect", which I'd intentionally mispeled...
Actually I would like a little code-phrase like "[note: different member of the
committee have at least three different opinions about what this means]" added
where applicable. :-)
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
Q: What is the most annoying thing on usenet and in e-mail?