diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-29 10:52:17 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-12-21 01:53:52 +0100 |
| commit | eeacb2cb90b2a6275935bb61613383413a9d2779 (patch) | |
| tree | 52b2bb3147dc201fe15b2268c8ce4aded42b6cde /validation/backend | |
| parent | fe71f6b3064072ba5a6b8531c76b531bbb3b963d (diff) | |
| download | sparse-dev-eeacb2cb90b2a6275935bb61613383413a9d2779.tar.gz | |
dereference of a function is a no-op
For the '*' operator and functions, the C standard says:
"If the operand points to a function, the result is a
function designator; ... If the operand has type
‘pointer to type’, the result has type ‘type’".
but also (C11 6.3.2.1p4):
"(except with 'sizeof' ...) a function designator with type
‘function returning type’ is converted to an expression
that has type ‘pointer to function returning type’".
This means that in dereferencement of a function-designator is
a no-op since the resulting expression is immediately back converted
to a pointer to the function.
The change effectively drop any dereferencement of function types
during their evaluation.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/backend')
0 files changed, 0 insertions, 0 deletions
