Monday, August 9, 2010

Translation Limits

The term "translation limits" refers to the minimum numbers of various element that a C compiler must be able to handle. These include such things as the length of identifiers, levels of nesting, number of case statements, and a number of member allowed in structure or union. C99 has increased several of these limits beyond the already generous ones specified by C89. Here are some examples:

Limit                                                                       C89      C99
Nesting levels of blocks                                         15        127
Nesting levels of conditional inclusion                  8          63
Significant characters in an internal identifier       31        63
Significant characters in an external identifier      6          31
Members of a structure or union                         127      1023
Arguments in a function call                                31        127
Numbers of case statement in switch                 257     1023

Ref: C, The Complete Reference by Herbert Schildt (Fourth Edition)


Some good c-examples