dereferencing function pointers

This commit is contained in:
pommicket 2022-02-03 21:46:36 -05:00
parent 3e6cacfb7c
commit fd02968c23
3 changed files with 15 additions and 8 deletions

View file

@ -1620,10 +1620,13 @@ function parse_expression
return out
:unary_dereference
type_decay_array_to_pointer(*4a)
; @TODO : dereferencing a function (annoyingly, p is the same as *p for function pointers)
if *2p == TYPE2_FUNCTION_POINTER goto type_deref_fpointer
if *1p != TYPE_POINTER goto unary_bad_type
*4type = *4a + 1
return out
:type_deref_fpointer
*4type = *4a
return out
:unary_type_logical_not
type_decay_array_to_pointer(*4a)
if *1p > TYPE_POINTER goto unary_bad_type