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

va_start is not supported on sysv abi? #19

Open
Inori opened this issue Jun 21, 2019 · 0 comments
Open

va_start is not supported on sysv abi? #19

Inori opened this issue Jun 21, 2019 · 0 comments

Comments

@Inori
Copy link

Inori commented Jun 21, 2019

Compiled on Win64, using clang-cl.
Test code:

int __attribute__((sysv_abi)) my_sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...)
{
	va_list arg_list;
	va_start(arg_list, format);
	int ret = vsprintf_s(buffer, sizeOfBuffer, format, arg_list);
	va_end(arg_list);

	//__builtin_va_list v_list;
	//__builtin_va_start(v_list, format);
	//int ret = vsprintf_s(buffer, sizeOfBuffer, format, v_list);
	//__builtin_va_end(v_list);

	return ret;
}

Neither will compile, I get:
error : 'va_start' used in System V ABI function

How can I deal with this?

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

No branches or pull requests

1 participant