Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser allows more constructs under -exx than without it #26

Closed
StringEpsilon opened this issue Mar 18, 2016 · 2 comments
Closed

Parser allows more constructs under -exx than without it #26

StringEpsilon opened this issue Mar 18, 2016 · 2 comments

Comments

@StringEpsilon
Copy link

Duplicated here for BountySource.

Original Link:
https://sourceforge.net/p/fbc/bugs/801/

cVarOrDeref() allows DEREFs but not CALLCTOR/TYPEINI nodes, so it behaves differently with/without -exx for expressions like *@type<...>(...) (with -exx the DEREF/ADDROF is preserved due to null pointer checks, but without -exx it is solved out).
-exx should not have this kind of effect on the parsing.
Maybe cVarOrDeref() should just accept CALLCTOR/TYPEINI nodes too, but then code like this would be accepted too:

type UDT
    i as integer
end type

dim x as UDT

type<UDT>(1) = x

which I don't think was ever intended to work. On the other hand, this already works:

type<UDT>().i = 1

so it wouldn't matter much.

@StringEpsilon
Copy link
Author

Bountysource

@jayrm
Copy link
Member

jayrm commented Aug 21, 2018

Fixed at revision 391527e. Requires fb.net bug fix https://sourceforge.net/p/fbc/bugs/886, and adds and additional code to solve out null pointer where not needed.

@jayrm jayrm closed this as completed Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants