static

static is a #202205171449.

When it is defined in the global scope, it will make the corresponding function or variable invisible from outside sources.

When it is defined in a local scope as a variable, it will initialise only once, and it will exist throughout the program’s lifetime. In this context, it cannot be used together with 202205171504 since C doesn’t allow multiple storage identifier for a single variable.

Links to this page
  • register

    Note: register cannot be used together with 202202111824 as both of them are storage specifier and C don’t allow to have more than one of them.

  • _Generic

    The expression could be variable or function (decay to 202202142131#). Therefore, depending on the type of X, it will find the most suitable expression for itself according to the result of controlling expression. The variables in controlling expression including the function parameters should not be qualified types (have identifier 202202111824#, 202202111830#, 202205171452#, 202205171504# and 202202081526#), array types and function types.

  • Inline Function

    That being said, add the identifier inline to a function only if it is relatively stable, that is not many changes will be expected to be done on this function. If there is a change on the function, the compiler will rebuild all TU that called the function which can increase the compilation time. Additionally, Inline Function can’t access any variable or function that has identifier 202202111824 although passing the pointer of them to the function is fine.

  • C Linkage Keyword
#c