- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try:
typedef void (__stdcall *LPFNCALLBACK)(int);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I partially confirmthe statement. Here are someresults for a declaration:
typedef void __stdcall (*LPFNCALLBACK)(int);
I tried to compile with4 non Intelcompilers:
MS Visual Studio 2005 // Error C2059: syntax error : '('
Borland C++ v5.1.1 // Compiled
MinGW v3.4.2 // Compiled
Turbo C++v3.0.0 // Error: ) expected
So, it is 50-50 in my tests.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Final results for a declaration:typedef void __stdcall (*LPFNCALLBACK)(int);
Intel C++ // Some error
MS Visual Studio 2005 // Error C2059: syntax error : '('
Borland C++ v5.1.1 // Compiled
MinGW v3.4.2 // Compiled
Turbo C++v3.0.0 // Compiled ( __stdcall is not supported and _cdecl was used instead )
So, it is 40-60now.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...On Windows Intel compiler is compatible with Microsoft compiler and on Linux Intel compiler is compatible with gcc...
Let me "translate" your explanation to another form: If a software developer implemented some code in C/C++ with Intel compiler it would be impossible to port the codewithout modifications to Linux. Right?
Look, there are standards and specifications forC and C++ languages.
For example, Turbo C++ v3.x.x,more than 20 year old compiler for MS DOS operating system!,supports C++ standard 2.1 and version 3.0 templates.
I wonder if that error, in case ofIntel and Microsoft,is some kind littledeviation from these standards.
Also, such declaration is Not a feature ofC++. It is a way howa software developercoulddeclare a typedef in C language. Pesonally, I always use thesecond form of the declaration.
Best regads,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> Let me "translate" your explanation to another form: If a software developer implemented some code in
> C/C++ with Intel compiler it would be impossible to port the codewithout modifications to Linux. Right?
That is probablycorrect for any non trivial program (A "hello world" program would I'msure workcorrectly on both platforms).We guarantee both source and link compatibility with the Microsoft compiler on Windows and have put in hundreds,perhaps thousands,of fixes for this. Same thing on Linux, we have spent many years and put in hundreds and hundreds of changes in order to guarantee GNU compatibility. Is it not just a "little" deviation. We also have hundreds of differences based upon Gnu compiler version and Microsoft compiler version.On Linux you can useour -strict_ansi option for closer adherence to the standard and on Windows you can use the /Za option.
If we only implemented standard C++ then we would need our own set of system headers and libraries and users could not mix and match with binaries/libraries created by the reference compiler.
I don't know what "C++ standard 2.1 and version 3.0 templates" means. The C andC++ standards areusually referred to by the yearthey were published, i.e. C++ 1998 or C++ 2011 or C 1999. Are you referring to compatiblity with the original AT&T cfront compiler or the edition of the Stroustrup book?
Calling conventions are not part of the C or C++ standards (because they are platform specific)so there is no "standard" syntax for them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>or C++ 2011 or C 1999. Are you referring to compatiblity with the original AT&T cfront compiler or
>>the edition of the Stroustrup book?..
Partially Yes. For example, for Turbo C++ v3.xthis is before1992 or so, for Borland C++ v5.xthis is before1993, or so.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page