For a regular function call, the postfix expression must be either an lvalue that refers to the function (in this case, the standard conversion of the-to-pointer function (4.3) is suppressed in the postfix expression) or it must have a pointer to the type of the function.
So, the "postfix expression" is defined in 5.2 / 1 ... this is not necessarily a grammatical element, which means the type of " x++ " postfix ... look at the list itself. Basically, the fact is that there is an expression that:
- "there must be either an lvalue that refers to the function (in this case, the standard conversion of the-to-pointer function (4.3) is suppressed in a postfix expression)"
This means that the expression is actually an identifier for the function or something like (x ? fn1 : fn2) . It does not need to be converted to a pointer - the compiler already knows how to call the function.
(The reason that it should not be converted is the priority of the operator - in particular, the suffix ++ and -- , () for function calls [] And -> all have the same priority and associativity from left to right, therefore, for example , [1]f(1,2,3) considered as [1](f(1,2,3)) , because this is the only match of the parsing, whereas if decomposition into a pointer occurs, associativity from left to right will consider it like ([1]f)(1,2,3) .)
- "or it must have a pointer to the type of function."
So you can also point to a function pointer.
source share