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 identifierMin C limitMin C++ limitDefault limit
statement_depth15256none
hash_if_depth8256none
declarator_max12256none
paren_depth32256none
name_limit311024none
extern_name_limit61024target
external_ids51165536target
block_ids1271024none
macro_ids102465536none
func_pars31256none
func_args31256none
macro_pars31256none
macro_args31256none
line_length50965536none
string_length50965536none
sizeof_object32767262144target
include_depth8256256
switch_cases25716384none
data_members12716384none
enum_consts1274096none
nested_class15256none
atexit_funcs3232target
base_classesN/A16384none
direct_basesN/A1024none
class_membersN/A4096none
virtual_funcsN/A16384none
virtual_basesN/A1024none
static_membersN/A1024none
friendsN/A4096none
access_declarationsN/A4096none
ctor_initializersN/A6144none
scope_qualifiersN/A256none
external_specsN/A1024none
template_parsN/A1024none
instance_depthN/A1717
exception_handlersN/A256none
exception_specsN/A256none

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.