Does ansi C place a limit on the number of external variables in a program?

后端 未结 3 411
刺人心
刺人心 2021-01-24 22:19

By external variable I mean a variable declared with the extern modifier (and defined elsewhere in the program).

I\'ve been told of this limitation, and couldn\

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-24 22:38

    The C99 standard specifies several translation limits (5.2.4.1). One of those is :

    4095 external identifiers in one translation unit

    The C89 standard specifies this limit (2.2.4.1) :

    511 external identifiers in one translation unit

    Note that these are minimum limits for conforming implementations, not absolute limits.

提交回复
热议问题