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

avoid closure cfunctions #467

Merged
merged 3 commits into from
Jan 25, 2024
Merged

avoid closure cfunctions #467

merged 3 commits into from
Jan 25, 2024

Conversation

benlorenz
Copy link
Member

Maybe fix some errors on M1 with julia nightly.
Still unclear why this only happens with nightly.

@fingolfin
Copy link
Member

I can reproduce the issue with Julia master on my M1 mac, and also can verify that this PR fixes using Polymake there

@benlorenz benlorenz marked this pull request as ready for review January 24, 2024 07:13
@benlorenz benlorenz requested a review from lkastner January 24, 2024 10:35
@@ -1,3 +1,5 @@
_test_rand_fun() = return 42

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better just " = 42"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@laurentbartholdi
Copy link

laurentbartholdi commented Jan 24, 2024 via email

@benlorenz
Copy link
Member Author

With this PR both helper functions are global and there should be no closures.

Once I have access to an M1 mac myself I can do some testing if this can be solved with a macro or something like @inline as well but for now this PR seems to work and fixes the issue.
Even if this gets fixed in llvm in the near future we will still keep supporting older julia versions without that feature for a while.

My why? was only referring to why = 42 is better than = return 42.

@benlorenz benlorenz merged commit 4a5f80d into master Jan 25, 2024
25 checks passed
@benlorenz benlorenz deleted the bl/cfun branch January 25, 2024 12:58
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.

4 participants