Tom St Denis said:
I don't get your comment.
It's not guranteed to work or not allowed to succeed?
It's not guaranteed to work. Of course it's allowed to succeed.
Does the standard guarantee any length program will work on any
platform?
Not really. The only such guarantee is in C99 5.2.4.1:
The implementation shall be able to translate and execute at least
one program that contains at least one instance of every one of
the following limits:
followed by a list of limits (127 nesting levels of blocks, etc.).
It would, of course, be possible for an implementation to recognize
one such program, and fail to compile anything useful. But it would
be a significant amount of work for the sake of producing an
implementation that's conforming but useless. In real life, the most
straightforward way to satisfy this extremely narrow requirement is to
create a useful implementation with reasonable limits.
My point/question is, does the standard specifically state that such
behaviour is non-comformant? Or are the rules just relaxed to the
point where you don't have to support it and still claim C99
conformance?
Um, what behavior? If you mean failing to execute a program that
creates a 2250000-byte object, yes, that's permitted.
I know many platforms where a 64K structure wouldn't fit anyways
The requirement to support a 65535-byte object aplies only to hosted
environments.