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

compiler: disallow callconv etc from depending on function parameters #22264

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mlugg
Copy link
Member

@mlugg mlugg commented Dec 18, 2024

even if you thought this feature was useful it really doesn't seem worth 500 damn lines of compiler logic :)

Resolves: #22261


This PR also implements a breaking change to disallow align/linksection/addrspace annotations on globals with comptime-only types. This includes function aliases, but not function declarations.

src/Zcu/PerThread.zig Outdated Show resolved Hide resolved
Just a small refactor.
@mlugg mlugg force-pushed the no-generic-callconv branch from 5e48cdc to 594ef31 Compare December 18, 2024 20:35
@mlugg mlugg added breaking Implementing this issue could cause existing code to no longer compile or have different behavior. release notes This PR should be mentioned in the release notes. labels Dec 18, 2024
@mlugg mlugg force-pushed the no-generic-callconv branch from 594ef31 to d25df63 Compare December 18, 2024 22:08
@mlugg mlugg force-pushed the no-generic-callconv branch from d25df63 to 1679a65 Compare December 18, 2024 23:07
This includes function aliases, but not function declarations.

Also, re-introduce a target check for function alignment which was
inadvertently removed in the prior commit.
@mlugg mlugg force-pushed the no-generic-callconv branch from 1679a65 to 26aafac Compare December 18, 2024 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Implementing this issue could cause existing code to no longer compile or have different behavior. release notes This PR should be mentioned in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not allow callconv, align, addrspace, or linksection to reference function arguments
2 participants