Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346422 - Support for microsoft compiler
Summary: Support for microsoft compiler
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords: helpwanted
: 350191 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-19 07:59 EDT by Loaden CLA
Modified: 2020-09-04 15:19 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***