Community
Participate
Working Groups
Build Identifier: M20100909-0800 C/C++ parser seems to have problems with va_arg(...) macro. Following code is clean for g++ compiler, but CDT Editor reports syntax error: void foo(int i, ...) { va_list argp; va_start(argp, i); int i = va_arg(argp, int); // <-- syntax error in this line va_end(argp); } Reproducible: Always Steps to Reproduce: 1. Try to use va_arg() macro
The va_arg() macro is not pre-defined, it is defined in <stdarg.h>. Include this header and make sure that the indexer can resolve it (configure include search path). If that does not work, please create a parser log for the file (context menu of file in projet explorer - Index - Create Parser Log) and attach it and reopen the bug.