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

missing makl_va_list_copy_by_value #3

Open
thomas-fossati opened this issue Mar 22, 2017 · 0 comments
Open

missing makl_va_list_copy_by_value #3

thomas-fossati opened this issue Mar 22, 2017 · 0 comments

Comments

@thomas-fossati
Copy link

It'd be nice to have a configure check to test whether va_list can be copied by value, e.g.:

#include <stdarg.h>
#include <stdlib.h>

void f(int i, ...)
{
  va_list args1, args2;
  va_start(args1, i);
  args2 = args1;
  if (va_arg(args2, int) != 42 || va_arg(args1, int) != 42)
    exit(1);
  va_end(args1);
  va_end(args2);
}

int main()
{
  f(0, 42);
  return 0;
}

This would be handy to conditionally disable stuff like https://github.com/koanlogic/klone/blob/master/src/libio/io.c#L637

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