MATLAB: Does PolySpace error out when I use custom ‘va_list.h’ file and not the one used by PolySpace Client for C/C++ 4.2 (R2007a+)

compilationpolyspacePolyspace Client for C/C++va_listva_list.h

When I submit code including my own implementation of 'va_list.h' file, PolySpace throws the following error:
Verifying cross-files ANSI C compliance
Stubbing standard library functions ...
C-STUBS/__polyspace__stdstubs.c: /cygdrive/c/PSAudits/LRR3/6.0.0_M1.2/tools/compiler/diab/5.5.1.0/include/diab/va_list.h:35: conflict in redeclaration of `__gnuc_va_list'
C-STUBS/__polyspace__stdstubs.c: /cygdrive/c/PSAudits/LRR3/6.0.0_M1.2/tools/compiler/diab/5.5.1.0/include/diab/va_list.h:79: conflict in redeclaration of `va_list'

Best Answer

This enhancement has been incorporated in Release 2010a (R2010a). For previous product releases, read below for any possible workarounds:
The error message is because PolySpace Client for C/C++ 4.2 (R2007a+) does not support user defined va_list.h.
To work around this, use the following analysis option to run the compilation and verification:
-D __Iva_list
The compilation flag is found at the beginning of the header file va_list.h:
#ifndef __Iva_list
#define __Iva_list
<contents of the va_file.h header file >
#endif /* __Iva_list */