Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327215 - Syntax error if using va_arg macro
Summary: Syntax error if using va_arg macro
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Mike Kucera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-07 07:49 EDT by Filipp Andjelo CLA
Modified: 2010-10-07 10:08 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filipp Andjelo CLA 2010-10-07 07:49:44 EDT
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
Comment 1 Markus Schorn CLA 2010-10-07 10:08:56 EDT
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.