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

allow assignments between different pointer types #466

Merged

Conversation

riederm
Copy link
Collaborator

@riederm riederm commented Feb 15, 2022

casts between pointer types will generate a llvm bitcast statement

e.g.
x : INT; p : POINTER TO BYTE;
p := &x;

fixes #463

casts between pointer types will generate a llvm bitcast statement

e.g.
x : INT; p : POINTER TO BYTE;
p := &x;

fixes #463
@riederm riederm force-pushed the issue-463-allow_automatic_pointer_casts_as_seen_in_oscat branch from 8c629ff to c45ceba Compare February 15, 2022 16:17
@riederm
Copy link
Collaborator Author

riederm commented Feb 15, 2022

with this commit we can build the oscat lib as it is commited to https://github.com/PLC-lang/oscat.git (#f72b5bf)

cargo run -- -c -o oscat.o path/to/oscat-repo/*.st

althoug it does not mean that the compiled code is correct - we can now compile without segfaulting. clang-12 still has some issues (but very late in the code ~line 46k)

@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2022

Codecov Report

Merging #466 (e1de25f) into master (4a7b8a6) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
- Coverage   92.78%   92.78%   -0.01%     
==========================================
  Files          36       36              
  Lines       13216    13220       +4     
==========================================
+ Hits        12263    12266       +3     
- Misses        953      954       +1     
Impacted Files Coverage Δ
src/codegen/llvm_typesystem.rs 79.91% <100.00%> (+0.33%) ⬆️
src/lexer.rs 97.66% <0.00%> (-0.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a7b8a6...e1de25f. Read the comment docs.

@riederm riederm requested review from ghaith and 99NIMI February 15, 2022 18:37
@ghaith ghaith merged commit 596aa03 into master Feb 16, 2022
@ghaith ghaith deleted the issue-463-allow_automatic_pointer_casts_as_seen_in_oscat branch February 16, 2022 09:02
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

Successfully merging this pull request may close these issues.

allow (automatic?) pointer casts as seen in oscat
3 participants