Serve said:
Ah thats what I meant. The minimum required size a header file must be.
Im asking this because somebody generated a header file of 5MB and some
compiler refuses to compile it. But I couldnt find it in the standard
Implementations are allowed to have limits on the programs they can
handle. They are only required to translate and execute correctly one
program - but this one program must meet certain minimum requirements
specified in 5.2.4.1p1. Therefore, any implementation with a hard limit
that corresponds to one of the specified minimums must set that hard
limit to a value equal to or greater than that minimum value. Note,
however, that none of those minimums corresponds directly to the size of
the source code files.
In most cases, those minimums correspond to data structures set up by
the compiler that can be, and probably are, dynamically allocated.
Instead of 22 different hard-coded limits, there's often just one soft
limit: the compiler must fail if one of the dynamic allocations fails.
It's easy to come up with a "one program" meeting the requirements of
5.2.4.1p1 that puts quite minimal strains on the total memory required.
I can easily believe that, on some small systems, a compiler that is
fully conforming because it can handle it's "one program", might
nonetheless run out of memory while handling a 5MB header file.