Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How come I get “_builtin_va_start” undefined when I build with gcc?

build gcc undefined
0
Posted

How come I get “_builtin_va_start” undefined when I build with gcc?

0

The and include files define va_start in terms of this function, which is built-in on the HP C compiler. If you’re using GCC you should be picking up include files from the gcc library directory. These include files do the right thing for both GCC and HP C. More often than not these files were never installed, or someone has placed a copy of varargs.h/stdarg.h into /usr/local/include (gcc searches there first). When all else fails, you can replace the definition of va_start as follows, depending on whether you are using varargs or stdarg (K&R or ANSI, respectively). #include #ifdef __hppa #undef va_start #define va_start(a) ((a)=(char *)&va_alist+4) #endif #include #ifdef __hppa #undef va_start #define va_start(a,b) ((a)=(va_list)&(b)) #endif For , this replacement should always work. For , this replacement will work unless the last fixed parameter (“b” in the call to va_start) is a structure larger than 8 bytes. Large

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.