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

About fixed with integers and PR #73 #75

Closed
mertcandav opened this issue Feb 1, 2024 · 4 comments
Closed

About fixed with integers and PR #73 #75

mertcandav opened this issue Feb 1, 2024 · 4 comments
Assignees
Labels
api About API compiler/runtime Related with runtime compiler Related with compiler/compile-time

Comments

@mertcandav
Copy link
Member

What would you like to share?

The PR #73 causes build errors, therefore reverted.
This problem have to investigate.
If problem can solved, this PR will be implemented.

Also here is a few questions for the PR author @vil02:

  • This changes can effect performance?
  • This changes reduces or increases portability of code between compilers, operating systems, CPUs?

Relevant PRs:

Additional information

No response

@mertcandav mertcandav added compiler/runtime Related with runtime compiler Related with compiler/compile-time api About API labels Feb 1, 2024
@mertcandav mertcandav self-assigned this Feb 1, 2024
@vil02
Copy link
Contributor

vil02 commented Feb 2, 2024

* This changes can effect performance?

No.

* This changes reduces or increases portability of code between compilers, operating systems, CPUs?

It increases portability. The size of the basic integer types is not fixed. For example the long is 64 bits in gcc and 32 bits in MSVC. Please have a look at these two examples:

As suggested here - please try to rerun the failed jobs.

@mertcandav
Copy link
Member Author

I can rerun all failed jobs but it will not change anything I think. CI uses compiler that compiled-from-source via main branch of Jule. Probably your PR compiled because changes not merged to main. Therefore I need to investigate that and I did, as a result my local compiler generates compilation errors same as CI.

I removed explicit generics of std::make_tuple to solve problem. Clang compiles successfully, but GCC generates errors such as not declared, for example jule::I32 not declared, did you mean jule::F32. Do you know why is GCC cannot compile?

I also tried with typedef instead of using keyword. Same result.

My GCC compile command is: g++-13 --std=c++17 dist/ir.cpp

@vil02
Copy link
Contributor

vil02 commented Feb 2, 2024

I just realized that U32 has the same size as U64, so U32, U64, Uint and std::size_t are all the same. Therefore, #73 introduced some problems (because U32 and I32 started to have 32 bits).

@mertcandav
Copy link
Member Author

Alright. I solved problem. GCC generates error because I missed to include <cstdint> header.

I will push your changes.
Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api About API compiler/runtime Related with runtime compiler Related with compiler/compile-time
Projects
None yet
Development

No branches or pull requests

2 participants