On 23 mar, 02>53, "Ivan Vecerina"
I know. I simply used this reference to show that it is not
unreasonable to invite someone to check the documentation
of his platform/compiler to look for restrictions on, for
instance, the maximum size of a local variable.
Even if it weren't in the standard, such a suggestion wouldn't
be unreasonable from a logical point of view; it only makes
sense to document such factors, from a quality of implementation
point of view, at least.
Realistically, on the other hand, I've never been able to find
such documentation for any of the compilers I use, so I'm not
sure how effective the advice is practically.
The OP faced an error trying to declare a large array,
probably as a local or static variable. I warned him that
limits exist (and suggested a way he could educate himself
about them) before inviting him to use dynamic memory
allocation. I was genuinely and simply trying to provide some
helpful guidance to the OP.
I understand that. In practice, however, I'd be very surprised
if the advice worked.
The replies you (James and Pete) added to my post seem to
serve something else than this simple altruistic purpose. Of
course this is ok too... but maybe it is just a waste of our
time (yours and mine).
The dialog between Pete and I has nothing directly to do with
the original question. We're both interested in the standard,
per se (even when compilers don't strictly adher to it), and the
text you quoted does seem to be a contradiction in the standard,
which should be corrected. (The section is either normative, or
it shouldn't say "shall".) comp.std.c++ might be more
appropriate, but the thread started here, and of course,
comp.std.c++ seems to be dead at present.