look at this simple code. As you see, it should work:
void
test(const char *str1, short num1, …) {
const char *str2;
va_list argv;
va_start(argv, num1);
str2 = va_arg(argv, const char *);
printf("%s %d %s\n", str1, num1, str2);
va_end(argv);
}
int
main(int argc, char *argv[]) {
test(“A”, 1, “B”);
return 0;
}
this program should run, surely. it does it with linux, win32 or any
other os. but, it fails under QNX!
This program does SIGSEGV on my qnx 6.2.1 NC. either with gcc or qcc.
It’s my hands or it is really a bug?
Anyone, please, try to gcc it and tell me, it is I who wrong or QNX
team?