W3C home > Mailing lists > Public > public-html@w3.org > November 2007

Re: Proposal: standardize browser specific CSS include

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Fri, 02 Nov 2007 00:58:10 +0000
Message-ID: <472A7622.409@cam.ac.uk>
To: Andrew Fedoniouk <news@terrainformatica.com>
CC: public-html@w3.org

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
Received 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