Keil Logo

C++ ISO/IEC standard limits

16.1 C++ ISO/IEC standard limits

The ISO/IEC C++ standard recommends minimum limits that a conforming compiler must accept. You must be aware of these when porting applications between compilers.

The following table gives a summary of these limits.
In this table, a limit of memory indicates that the ARM compiler imposes no limit, other than that imposed by the available memory.

Table 16-1 Implementation limits

Description Recommended ARM
Nesting levels of compound statements, iteration control structures, and selection control structures. 256 memory
Nesting levels of conditional inclusion. 256 memory
Pointer, array, and function declarators (in any combination) modifying an arithmetic, structure, union, or incomplete type in a declaration. 256 memory
Nesting levels of parenthesized expressions within a full expression. 256 memory
Number of initial characters in an internal identifier or macro name. 1 024 memory
Number of initial characters in an external identifier. 1 024 memory
External identifiers in one translation unit. 65 536 memory
Identifiers with block scope declared in one block. 1 024 memory
Macro identifiers simultaneously defined in one translation unit. 65 536 memory
Parameters in one function declaration. 256 memory
Arguments in one function call. 256 memory
Parameters in one macro definition. 256 memory
Arguments in one macro invocation. 256 memory
Characters in one logical source line. 65 536 memory
Characters in a character string literal or wide string literal after concatenation. 65 536 memory
Size of a C or C++ object (including arrays). 262 144 4 294 967 296
Nesting levels of #include file. 256 memory
Case labels for a switch statement, excluding those for any nested switch statements. 16 384 memory
Data members in a single class, structure, or union. 16 384 memory
Enumeration constants in a single enumeration. 4 096 memory
Levels of nested class, structure, or union definitions in a single struct declaration-list. 256 memory
Functions registered by atexit(). 32 33
Direct and indirect base classes. 16 384 memory
Direct base classes for a single class. 1 024 memory
Members declared in a single class. 4 096 memory
Final overriding virtual functions in a class, accessible or not. 16 384 memory
Direct and indirect virtual bases of a class. 1 024 memory
Static members of a class. 1 024 memory
Friend declarations in a class. 4 096 memory
Access control declarations in a class. 4 096 memory
Member initializers in a constructor definition. 6 144 memory
Scope qualifications of one identifier. 256 memory
Nested external specifications. 1 024 memory
Template arguments in a template declaration. 1 024 memory
Recursively nested template instantiations. 17 memory
Handlers per try block. 256 memory
Throw specifications on a single function declaration. 256 memory
Non-ConfidentialPDF file icon PDF versionARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.