Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346422

Summary: Support for microsoft compiler
Product: [Tools] CDT Reporter: Loaden <loaden>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
Status: ASSIGNED --- QA Contact: Jonah Graham <jonah>
Severity: enhancement    
Priority: P3 CC: cdtdoug, joant, loaden, yevshif
Version: 8.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Loaden CLA 2011-05-19 07:59:01 EDT
Build Identifier: I20110512-2000

#include <stdio.h>

void __cdecl func1() {} // parsing error
void _cdecl func12() {} //  parsing error
void __stdcall func2() {} // parsing correct
void _stdcall func22() {} //  parsing error
void __fastcall func3() {} //  parsing error
void _fastcall func33() {} //  parsing error

int main()
{
    return 0;
}

Like the example code.
CDT 8.0 RC1.

Reproducible: Always
Comment 1 Markus Schorn CLA 2011-05-19 08:10:05 EDT
CDT does not have out of the box support for the microsoft compiler. To work around the issue you can define macros __cdecl, _cdecl, ... that exapand to the empty token.
Comment 2 Loaden CLA 2011-05-19 08:15:54 EDT
(In reply to comment #1)
> CDT does not have out of the box support for the microsoft compiler. To work
> around the issue you can define macros __cdecl, _cdecl, ... that exapand to the
> empty token.

I know if I define this macros, It's should works.
But they are too often used, and whether the special handling it?
Comment 3 Markus Schorn CLA 2011-06-29 10:11:09 EDT
The specifics that are needed to parse code that is written for the microsoft compiler can be implemented in a separate language object, just like the gcc specifics are configured via GPPLanguage. Once that is done you can switch to this language via the 'Language mappings' on the project properties page.

I am not going to work on this feature, you are welcome to provide patches.
Comment 4 Markus Schorn CLA 2011-06-29 10:16:44 EDT
*** Bug 350191 has been marked as a duplicate of this bug. ***