register

register is a C keyword to hint on the compiler in order to store the variable in processor register instead of in memory. However, this can only happen in the function scope, that is within the function itself. It is advised to use it on frequently used variable in order to optimise# the performance.

The side effect of the identifier register is that it could avoid 202205171500# for variables in the function scope.

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.

Links to this page
  • static

    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.

  • _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.

  • C Hygiene
    Avoid taking local variables addresses using & operator as this will inhibit 202205171500# which is great in 202203011139#. See 202205171504.
#c #memory