Article View: comp.std.c++
Article #1071Re: Standard identification of compilers?
From: Joe Huffman
Date: Tue, 07 May 1991 16:11
Date: Tue, 07 May 1991 16:11
20 lines
1300 bytes
1300 bytes
cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: >Does the proposed standard (C or C++) have a way of identifying whose compiler >is being used? I know its bad form to build code specific to a compiler when >that compiler conforms to a standard, but it seems that every compiler has its >little quirks that are specific to it. What I was wondering was if one could: > #if (__COMPILER__ == "BC++ v2.02") > ... > #endif I think your suggestion needs some modification... The test shown will generate a syntax error no matter what __COMPILER__ is defined to (an integer constant expression is expected). You might just compile a list of what the different vendors use for identification. Zortech uses __ZTC__ which expands to the version number in hex. For example: version 2.18 would have __ZTC__ equal to 0x218. -- joe@proto.com
Technical Details
Message-ID:
<1991May07.161128.13786@proto.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!proto!joeReferences:
<CIMSHOP!DAVIDM.91May6095720@uunet.UU.NET>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!proto!joe From: joe@proto.com (Joe Huffman) Newsgroups: comp.std.c++,comp.std.c Subject: Re: Standard identification of compilers? Message-ID: <1991May07.161128.13786@proto.com> Date: 7 May 91 16:11:28 GMT References: <CIMSHOP!DAVIDM.91May6095720@uunet.UU.NET> Distribution: comp Organization: Prototronics @ Sandpoint, Idaho Lines: 20