52
Where we say something is limited only by available memory, that means that internal data structures
impose no intrinsic limit, and space is allocated with
therefore depend on many things, such as the size of other things allocated by the compiler at the
same time, the amount of memory consumed by other processes on the same computer, etc.
Nesting levels of
•
#include
We impose an arbitrary limit of 200 levels, to avoid runaway recursion. The standard requires at
least 15 levels.
Nesting levels of conditional inclusion.
•
The C standard mandates this be at least 63. GNU CPP is limited only by available memory.
Levels of parenthesised expressions within a full expression.
•
The C standard requires this to be at least 63. In preprocessor conditional expressions, it is limited
only by available memory.
Significant initial characters in an identifier or macro name.
•
The preprocessor treats all characters as significant. The C standard requires only that the first 63
be significant.
Number of macros simultaneously defined in a single translation unit.
•
The standard requires at least 4095 be possible. GNU CPP is limited only by available memory.
Number of parameters in a macro definition and arguments in a macro call.
•
We allow
USHRT_MAX
127.
Number of characters on a logical source line.
•
The C standard requires a minimum of 4096 be permitted. GNU CPP places no limits on this,
but you may get incorrect column numbers reported in diagnostics for lines longer than 65,535
characters.
Maximum size of a source file.
•
The standard does not specify any lower limit on the maximum size of a source file. GNU cpp
maps files into memory, so it is limited by the available address space. This is generally at least two
gigabytes. Depending on the operating system, the size of physical memory may or may not be a
limitation.
11.3. Obsolete Features
GNU CPP has a number of features which are present mainly for compatibility with older programs.
We discourage their use in new code. In some cases, we plan to remove the feature in a future version
of GCC.
11.3.1. Assertions
Assertions are a deprecated alternative to macros in writing conditionals to test what sort of computer
or system the compiled program will run on. Assertions are usually predefined, but you can define
them with preprocessing directives or command-line options.
Assertions were intended to provide a more systematic way to describe the compiler's target system.
However, in practice they are just as unpredictable as the system-specific predefined macros. In addi-
tion, they are not part of any standard, and only a few compilers support them. Therefore, the use of
assertions is less portable than the use of system-specific predefined macros. We recommend you do
not use them at all.
files.
, which is no smaller than 65,535. The minimum required by the standard is
Chapter 11. Implementation Details
or equivalent. The actual limit will
malloc
Need help?
Do you have a question about the ENTERPRISE LINUX 3 - USING CPP and is the answer not in the manual?
Questions and answers