cpp: Implementation limits

1 
1 11.2 Implementation limits
1 ==========================
1 
1 CPP has a small number of internal limits.  This section lists the
1 limits which the C standard requires to be no lower than some minimum,
1 and all the others known.  It is intended that there should be as few
1 limits as possible.  If you encounter an undocumented or inconvenient
1 limit, please report that as a bug.  ⇒Reporting Bugs (gcc)Bugs.
1 
1    Where we say something is limited "only by available memory", that
1 means that internal data structures impose no intrinsic limit, and space
1 is allocated with 'malloc' or equivalent.  The actual limit will
1 therefore depend on many things, such as the size of other things
1 allocated by the compiler at the same time, the amount of memory
1 consumed by other processes on the same computer, etc.
1 
1    * Nesting levels of '#include' files.
1 
1      We impose an arbitrary limit of 200 levels, to avoid runaway
1      recursion.  The standard requires at least 15 levels.
1 
1    * Nesting levels of conditional inclusion.
1 
1      The C standard mandates this be at least 63.  CPP is limited only
1      by available memory.
1 
1    * Levels of parenthesized expressions within a full expression.
1 
1      The C standard requires this to be at least 63.  In preprocessor
1      conditional expressions, it is limited only by available memory.
1 
1    * Significant initial characters in an identifier or macro name.
1 
1      The preprocessor treats all characters as significant.  The C
1      standard requires only that the first 63 be significant.
1 
1    * Number of macros simultaneously defined in a single translation
1      unit.
1 
1      The standard requires at least 4095 be possible.  CPP is limited
1      only by available memory.
1 
1    * Number of parameters in a macro definition and arguments in a macro
1      call.
1 
1      We allow 'USHRT_MAX', which is no smaller than 65,535.  The minimum
1      required by the standard is 127.
1 
1    * Number of characters on a logical source line.
1 
1      The C standard requires a minimum of 4096 be permitted.  CPP places
1      no limits on this, but you may get incorrect column numbers
1      reported in diagnostics for lines longer than 65,535 characters.
1 
1    * Maximum size of a source file.
1 
1      The standard does not specify any lower limit on the maximum size
1      of a source file.  GNU cpp maps files into memory, so it is limited
1      by the available address space.  This is generally at least two
1      gigabytes.  Depending on the operating system, the size of physical
1      memory may or may not be a limitation.
1