IBM Support

Instrumentation source code result in "identifier <__builtin_stdarg_start> is undefined" compilation error

Technote (troubleshooting)


Attempts to instrument source code that includes "stdarg.h" with IBM Rational Test RealTime result in "error #20".


You see the following error.

attolccp: "/home/Rational/releases/examples/BaseStation_C/src/UmtsServer.cpp", line 17: error #20: identifier "__builtin_stdarg_start" is undefined __builtin_stdarg_start((arg_list),goober);
attolccp: "/home/Rational/releases/examples/BaseStation_C/src/UmtsServer.cpp", line 18: error #20: identifier "__builtin_va_end" is undefined
__builtin_va_end( arg_list );
attolccp - FATAL ERROR: Syntax and/or semantic errors in source file, instrumentation cancelled


Recent versions of GNU (after 2.95) have introduced new keywords for the GNU compiler, for example __builtin_va_end, These keywords point to the fact that these function are built into the compiler.

Resolving the problem

For the Test RealTime instrumentor to accept these built-in types, you must declare these.


#include "stdarg.h"
     static xxx( int goober, ... )
          va_list arg_list;
          va_start( arg_list, goober );
          va_end( arg_list );

To pre-declare these built-in types, add the following lines of code to the TDP in the TDP Editor.

  1. Start the TDP Editor.

  2. Open the TDP you are using with "File -> Open"

  3. Add the following to
    Parser Settings > Component Testing for C++ ... > Header file configuration

    #define __builtin_va_end(p)
    #define __builtin_stdarg_start(a,b)
    #define __builtin_va_arg(a,p) 0

Document information

More support for: Rational Test RealTime
Runtime Analysis

Software version: 7.5,,,, 8.0,,,,

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1130183

Modified date: 26 August 2013

Translate this page: