Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7942 Discussions

Linux C++ compiler: support for __if_exists is finally on?

dmitry_sychov
Beginner
925 Views

Hello,

We are in need of porting of huge C++ software program to linux. It uses a custom C++ library written by some really brilliant C++ programmer but with intense usage of __if_exists/__if_not_exists keywords. (close analog to "static if" support in 'D' language)

Until this time porting is not possible due to the fact that no linux(unix) compiler supports "__if_exists" extension.

But today, I've noticed the following in:

http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/

Update 6 (Posted April 2010), Package IDs below
...

DPD200017799 C++ Request to support MSVC __if_exists keyword on Linux

Does the above means, that the "__if_exists" support on Linux Intel C++ compiler is finally on?

Thank you, Dmitry

0 Kudos
11 Replies
Judith_W_Intel
Employee
925 Views

Actually this was only fixed in 12.0.

If you want Microsoft extensions such as __if_exists you can now use our new -fms-dialect switch on Linux and Mac.

Judy
0 Kudos
dmitry_sychov
Beginner
925 Views
Hello Judy,
You mean "-fms-dialect" is available as for today or will be on in the upcoming 12.0 release?
google reveals nothing on"-fms-dialect" keyword, no does the latest linux compiler documentation
0 Kudos
dmitry_sychov
Beginner
925 Views
i've downloadedmain_cls_lin.pdf but there are no references to"-fms-dialect" switch in it
0 Kudos
Judith_W_Intel
Employee
925 Views

-fms-dialect will be in the upcoming (12.0) release.
0 Kudos
dmitry_sychov
Beginner
925 Views
Hello,
Today I've noticed that the

DPD200017799C++Request to support MSVC __if_exists keyword on Linux
is no more listed on:
Does this mean that the support of __if_exists will not be implemented (ported from windows codebase) in the upcoming release of Intel C++ Compiler 12?
Regards, Dmitry
0 Kudos
mecej4
Honored Contributor III
925 Views
I think that you are drawing conclusions that are not justified. The fixes-list is just that: a list of errors fixed in 11.1, Update 6. It has nothing to do with what may or may not be in a future version.

It is possible that if, as you say, DPD200017799 was listed as 'fixed' at one time in the list and was later removed, that was simply a correction.
0 Kudos
Judith_W_Intel
Employee
925 Views

That is correct.

I've also recently learned that the -fms-dialect switch will only be officially supported and documented on Mac OS* X - although you can try to use it on other Linux* systems we have not tested and are not guaranteeing that using it will allow successful compilation of all the system header files.
0 Kudos
dmitry_sychov
Beginner
925 Views
Whatever.. it does not correlates with the prev info posted in this thread
0 Kudos
dmitry_sychov
Beginner
925 Views
I still don't get get. To make it straight, we are not particularlyinterested in fms-dialect and its Mac penetration, just the __if_exists keyword on Linux. since DPD200017799got disappearedfrom the list can we assume that the request got aborted?

and it was originally listed as "C++ Request to support MSVC __if_exists keyword on Linux"
with no refs to Mac, fms-dialect, etc..
0 Kudos
Judith_W_Intel
Employee
925 Views
We do not plan to support this feature by default on Linux ever unless Gnu decides tosupport it, which I doubt since it's not part of the C or C++ standard.

In 12.0 (not 11.1)you can use the -fms-dialect option which turns onlots of MS compatibility features and bugs, including __if_exists. But use at your own risk because we can't guarantee that the Linux system headers/libraries will work as expected with the MS dialect.

So you can consider this requestas eitherwill not be fixed (or fixed but not in the way you requested).
0 Kudos
dmitry_sychov
Beginner
925 Views
Ok, not a big deal to fix/rewrite some headers by hand - much better than trying to write a custom preprocessor... :) our project even uses hand written std classes library (all that containers/streams/strings stuff) so does not depend on standard c++ library headers
The linking process with linux system libraries should always work though, since linking together *.o files has nothing in common with c++ compilation options
0 Kudos
Reply