diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-11-19 16:43:55 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-11-20 21:28:42 +0100 |
| commit | 0eb8175d3e9c0d20354763d07ce3d4c0e543d988 (patch) | |
| tree | 6cce0cea812e635a661a7af612b74659cd503a38 /sparsec | |
| parent | af0c939354599110285978dbeb2cbb65acc537be (diff) | |
| download | sparse-dev-0eb8175d3e9c0d20354763d07ce3d4c0e543d988.tar.gz | |
fix expansion of function designator
The expression corresponding to the function pointer of indirect
call can be arbirarily complex. For example, it can contain a
statement expression or another call, possibly inlined.
These expressions must be expanded to insure that sub-expressions
involving 'sizeof()' or other operators taking a type as argument
(like __builtin_compatible_types_p()) are no more present (because
these expressions always evaluate to a compile-time constant and
so are not expected and thus not handled at linearization time).
However, this is not currently enforced, possibly causing some
failures during linearization with warnings like:
warning: unknown expression (4 0)
(which correspond to EXPR_TYPE).
Fix this, during the expansion of function calls, by also expanding
the corresponding designator.
References: https://lore.kernel.org/lkml/1542623503-3755-1-git-send-email-yamada.masahiro@socionext.com/
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'sparsec')
0 files changed, 0 insertions, 0 deletions
