Translation Limitations

This section describes the internal limitations of the Compiler. Some limitations depend on the operating system used. For example, in some operating systems, limits depend on whether the compiler is a 32-bit compiler running on a 32-bit platform, or if it is a 16-bit Compiler running on a 16-bit platform (e.g., Windows for Workgroups).

The ANSI-C column in the table below describes the recommended limitations of ANSI-C (5.2.4.1 in ISO/IEC 9899:1990 (E)) standard. These quantities are only guidelines and do not determine compliance. The `Implementation' column shows the actual implementation value and the possible message number. `-' means that there is no information available for this topic and `n/a' denotes that this topic is not available.

Table 1. Translation Limitations (ANSI)
Limitation Implementation ANSI-C
Nesting levels of compound statements, iteration control structures, and selection control structures 256 (C1808) 15
Nesting levels of conditional inclusion - 8
Pointer, array, and function decorators (in any combination) modifying an arithmetic, structure, union, or incomplete type in a declaration - 12
Nesting levels of parenthesized expressions within a full expression 32 (C4006) 32
Number of initial characters in an internal identifier or macro name 32,767 31
Number of initial characters in an external identifier 32,767 6
External identifiers in one translation unit - 511
Identifiers with block scope declared in one block - 127
Macro identifiers simultaneously defined in one translation unit 655,360,000 (C4403) 1024
Parameters in one function definition - 31
Arguments in one function call - 31
Parameters in one macro definition 1024 (C4428) 31
Arguments in one macro invocation 2048 (C4411) 31
Characters in one logical source line 2^31 509
Characters in a character string literal or wide string literal (after concatenation) 8196 (C3301, C4408, C4421) 509
Size of an object 32,767 32,767
Nesting levels for #include files 512 (C3000) 8
Case labels for a switch statement (excluding those for any nested switch statements) 1000 257
Data members in a single class, structure, or union - 127
Enumeration constants in a single enumeration - 127
Levels of nested class, structure, or union definitions in a single struct declaration list 32 15
Functions registered by atexit() - n/a
Direct and indirect base classes - n/a
Direct base classes for a single class - n/a
Members declared in a single class - n/a
Final overriding virtual functions in a class, accessible or not - n/a
Direct and indirect virtual bases of a class - n/a
Static members of a class - n/a
Friend declarations in a class - n/a
Access control declarations in a class - n/a
Member initializers in a constructor definition - n/a
Scope qualifications of one identifier - n/a
Nested external specifications - n/a
Template arguments in a template declaration - n/a
Recursively nested template instantiations - n/a
Handlers per try block - n/a
Throw specifications on a single function declaration - n/a

The table below shows other limitations which are not mentioned in an ANSI standard:

Table 2. Translation Limitations (non-ANSI)
Limitation Description
Type Declarations Derived types must not contain more than 100 components.
Labels There may be at most 16 other labels within one procedure.
Macro Expansion Expansion of recursive macros is limited to 70 (16-bit OS) or 2048 (32-bit OS) recursive expansions (C4412).
Include Files The total number of include files is limited to 8196 for a single compilation unit.
Numbers Maximum of 655,360,000 different numbers for a single compilation unit (C2700, C3302).
Goto M68k only: Maximum of 512 Gotos for a single function (C15300).
Parsing Recursion Maximum of 1024 parsing recursions (C2803).
Lexical Tokens Limited by memory only (C3200).
Internal IDs Maximum of 16,777,216 internal IDs for a single compilation unit (C3304). Internal IDs are used for additional local or global variables created by the Compiler (e.g., by using CSE).
Code Size Code size is limited to 32KB for each single function.
filenames Maximum length for filenames (including path) are 128 characters for 16-bit applications or 256 for Win32 applications. UNIX versions support filenames without path of 64 characters in length and 256 in the path. Paths may be 96 characters on 16-bit PC versions, 192 on UNIX versions or 256 on 32-bit PC versions.