diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-03-02 10:51:33 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-05-19 05:28:31 +0200 |
| commit | fee3d01d7ac170e7e90b8cd7f4923dbf3de8df7c (patch) | |
| tree | fec490477cce3c31e18b1735ecb6f82f177a3523 /validation | |
| parent | e35efe330c6ae7d154197c29b127560d569016d0 (diff) | |
| download | sparse-dev-fee3d01d7ac170e7e90b8cd7f4923dbf3de8df7c.tar.gz | |
returns the correct type when evaluating NULL
In evaluate_cast(), the expression '(void*)<some zero constant>',
aka 'NULL', is detected and given the type 'null_ctype',
a special kind of pointer type.
However the returned type is the original one: 'void *'.
This doesn't seem to be intented as in all other cases, the
evaluate_...() functions and ultimately evaluate_expression()
always return the type of the expression.
Fix this by returning the type given to the expression: null_ctype.
Reported-by: Dibyendu Majumdar <mobile@majumdar.org.uk>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
0 files changed, 0 insertions, 0 deletions
