Incorrect behavior when trying to bit-cast to and from pointers #47
Labels
No Label
bug
documentation
enhancement
help wanted
management
package: analyzer
package: compiler
package: errors
package: fsplc
package: generator
package: lexer
package: llvm
package: parser
performance
priority
question
refactor
status
backburner
status
duplicate
status
invalid
status
ongoing
status
wontfix
test
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fspl/fspl#47
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source A:
Behavior A:
Source B:
Behavior B:
The generator should never produce invalid IR (given a well formed AST), and the analyzer should be more consistent. The operation in question (bit casting a pointer to an integer and back) is necessary for working with C code and should be allowed and supported.
Need to uncomment
35479e68a8
partially fixes the generator side of this. These symptoms revealed more possible buggy behavior, see comments in the commit. Need more tests for these cases and to fix them.Bizarre behavior when trying to cast pointer to Indexto Incorrect behavior when trying to cast to and from pointersIncorrect behavior when trying to cast to and from pointersto Incorrect behavior when trying to bit-cast to and from pointersThe analyzer side of this issue has been completely remedied by #50
Putting this on the backburner for now as fully fixing this in the generator is non-trivial, and use cases for bit casting crazy stuff like structs to pointers are a bit slim