Andrew Fedoniouk wrote: > Each C/C++ compiler has its own vendor/version identifier. No one known > compiler is pretending to be another one. The Intel C++ Compiler, when on Windows, pretends to be Microsoft Visual C++. It defines the _MSC_VER macro, and has command-line switches to emulate the bugs/behaviour of VC++ 6.0/7.0/7.1/8.0. It has to do that so that existing VC++ programs can be ported to ICC easily. The same compiler on Linux pretends to be GCC by defining __GNUC__, for the same reasons. It has to implement lots of GCC-specific extensions to C++, in order to be useful in a world where many programs rely on those non-standard features. That sounds like quite a pain for Intel and for anyone else who wants to write a compiler, so it may not be the best model to emulate. It helps authors in the short term since they can write GCC-specific code and MSVC-specific code and get the right behaviour on each compiler, but it hurts compiler developers in the longer term since they can't implement pure standard C++ without breaking lots of existing code. -- Philip Taylor pjt47@cam.ac.ukReceived on Friday, 2 November 2007 00:58:22 UTC
This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:23 UTC