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

Technote (troubleshooting)


Problem(Abstract)

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

Symptom

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

Cause

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.

EXAMPLE


#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


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Test RealTime
Runtime Analysis

Software version:

7.5, 7.5.0.4, 7.5.0.5, 7.5.0.6, 8.0, 8.0.0.1, 8.0.0.2, 8.0.0.3, 8.0.0.4

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Reference #:

1130183

Modified date:

2013-08-26

Translate my page

Machine Translation

Content navigation