Skip to content

Remove syntax redundant with callconv #5268

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

Merged

Conversation

tadeokondrak
Copy link
Contributor

@tadeokondrak tadeokondrak commented May 4, 2020

Changes:

  • extern fn is a property of a function definition, not a prototype (did not have auto-fixes, now does)
extern fn foo() void {} // valid
extern extern fn foo() void {} // no longer valid
const bar = fn () callconv(.C) void; // valid
const baz = extern fn () void; // no longer valid
  • async fn is gone (did not have auto-fixes, now does)
fn foo() void { suspend; } // valid
fn bar() callconv(.Async) void {} // valid
async fn baz() void {} // no longer valid

#3977 (comment)

19:34 <tdeo> so `async fn` does still exist in the language, is it redundant and can be removed now?
19:35 <andrewrk> tdeo, yes it should be removed in favor of callconv(.Async)
  • stdcallcc and nakedcc have been removed from the self-hosted parser, they were already gone from the C++ version (previously had auto-fixes, now removed)

@tadeokondrak tadeokondrak force-pushed the remove-callconv-redundant-syntax branch 3 times, most recently from d3a7ab8 to d55c8b8 Compare May 4, 2020 17:55
@tadeokondrak tadeokondrak force-pushed the remove-callconv-redundant-syntax branch from d55c8b8 to a11ed22 Compare May 5, 2020 11:56
@tadeokondrak tadeokondrak force-pushed the remove-callconv-redundant-syntax branch from a11ed22 to 8cfec63 Compare May 5, 2020 15:38
@tadeokondrak tadeokondrak changed the title Remove callconv redundant syntax Remove syntax redundant with callconv May 5, 2020
@tadeokondrak tadeokondrak force-pushed the remove-callconv-redundant-syntax branch from 8cfec63 to 84a0a96 Compare May 5, 2020 16:31
@andrewrk andrewrk merged commit ba43492 into ziglang:master May 7, 2020
@andrewrk
Copy link
Member

andrewrk commented May 7, 2020

Nice work!

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.

2 participants