2. Implementation limits
This table gives the default implementation limits imposed by the C++ producer for the various implementation quantities listed in Annex B of the ISO C++ standard, together with the minimum limits allowed in ISO C and C++. A default limit of none means that the quantity is limited only by the size of the host machine (either ULONG_MAX
or until it runs out of memory). A limit of target means that while no limits is imposed by the C++ front-end, particular target machines may impose such limits.
Quantity identifier | Min C limit | Min C++ limit | Default limit |
---|---|---|---|
statement_depth | 15 | 256 | none |
hash_if_depth | 8 | 256 | none |
declarator_max | 12 | 256 | none |
paren_depth | 32 | 256 | none |
name_limit | 31 | 1024 | none |
extern_name_limit | 6 | 1024 | target |
external_ids | 511 | 65536 | target |
block_ids | 127 | 1024 | none |
macro_ids | 1024 | 65536 | none |
func_pars | 31 | 256 | none |
func_args | 31 | 256 | none |
macro_pars | 31 | 256 | none |
macro_args | 31 | 256 | none |
line_length | 509 | 65536 | none |
string_length | 509 | 65536 | none |
sizeof_object | 32767 | 262144 | target |
include_depth | 8 | 256 | 256 |
switch_cases | 257 | 16384 | none |
data_members | 127 | 16384 | none |
enum_consts | 127 | 4096 | none |
nested_class | 15 | 256 | none |
atexit_funcs | 32 | 32 | target |
base_classes | N/A | 16384 | none |
direct_bases | N/A | 1024 | none |
class_members | N/A | 4096 | none |
virtual_funcs | N/A | 16384 | none |
virtual_bases | N/A | 1024 | none |
static_members | N/A | 1024 | none |
friends | N/A | 4096 | none |
access_declarations | N/A | 4096 | none |
ctor_initializers | N/A | 6144 | none |
scope_qualifiers | N/A | 256 | none |
external_specs | N/A | 1024 | none |
template_pars | N/A | 1024 | none |
instance_depth | N/A | 17 | 17 |
exception_handlers | N/A | 256 | none |
exception_specs | N/A | 256 | none |
It is possible to impose lower limits on most of the quantities listed above by means of the directive:
#pragma TenDRA++ option value string-literal integer-literal
where string-literal gives one of the quantity identifiers listed above and integer-literal gives the limit to be imposed. An error is reported if the quantity exceeds this limit (note however that checks have not yet been implemented for all of the quantities listed). Note that the name_limit
and include_depth
implementation limits can be set using dedicated directives.
The maximum number of errors allowed before the producer bails out can be set using the directive:
#pragma TenDRA++ set error limit integer-literal
The default value is 32.