Skip to content

Conversation

john-h-kastner
Copy link
Collaborator

@john-h-kastner john-h-kastner commented Mar 2, 2021

3C ignored attributes when rewriting, so they would often be deleted or mess up rewriting in a way that made the uncompilable. Fixes #459 and adds a regression test for #450.

For example

void foo( const char *fmt, __builtin_ms_va_list argp);
__attribute__((ms_abi)) void bar ( const char *fmt, ...)  {
  __builtin_ms_va_list argp;
  __builtin_ms_va_start(argp, fmt);
  foo(fmt, argp);
  __builtin_ms_va_end(argp);
}

previously converted to

void foo( const char *fmt, __builtin_ms_va_list argp);
const char *fmt : itype(_Ptr<const char>), ...) {
  __builtin_ms_va_list argp;
  __builtin_ms_va_start(argp, fmt);
  foo(fmt, argp);
  __builtin_ms_va_end(argp);
}

but is now converted correctly.


benchmark run

@kyleheadley
Copy link
Member

LGTM

@john-h-kastner
Copy link
Collaborator Author

Now that we have compilation checks for our benchmarks in the works, I'll hold off on merging this until we can check that it doesn't break any currently compiling benchmarks.

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.

Rewrite error on functions with attributes

2 participants