Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Compaq C/C++ Team <compaq_c@zko.dec.com>
Subject: Re: Compaq's c++ succesfully runs under Debian woody
Date: 2000/04/03	[thread overview]
Message-ID: <38E920AA.41C6@zko.dec.com> (raw)
In-Reply-To: 38E5D353.8A47DF26@chello.nl

Abraham Theodorus Stolk wrote:
> I have one remaining problem though:
> Now I have a gnu and a compaq compiler installed, and I would like
> to print runtime msgs in my app, stating the compiler that was used.
> 
> Unfortunately, compaqs compiler seems to come without a
> /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/cpp,
> so gnu's cpp is used, which expands the __VERSION__ macro to
> gcc's version string, and not ccc's version string.
> 
>    Bram

Neither of the compilers normally invoke gnu cpp to perform
preprocessing, nor do they provide a separate standalone
preprocessor program.  Instead they perform preprocessing
as an integrated part of compiler, and if you ask for explicit
preprocessor output, the -E or -P flag gets passed into the
compiler telling it to produce preprocessor output without
going any further into the compilation process.

The version of the compiler is available as a predefined
macro, __DECC_VER for ccc and __DECCXX_VER for cxx.  Each of
these macros expands to an integer that encodes the complete
version number of the compiler (excluding the "repackaging
number") in fixed decimal digit positions as follows:

For V6.2-002, __DECC_VER = 60290002:

            6 . 2 V -002
            6  02 9 0002

For T6.3-003, __DECCXX_VER = 60360003:

            6 . 3 T -003
            6  03 6 0003

If you want to print it in an application, you can just print
the integer, or break it down into its components with / and %.

  - Compaq C/C++ Team



  reply	other threads:[~2000-04-03  4:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-01  5:00 Compaq's c++ succesfully runs under Debian woody Abraham Theodorus Stolk
2000-04-03  4:00 ` Compaq C/C++ Team [this message]
2000-04-04  4:00   ` Greg Lindahl
2000-04-04  4:00     ` Bram Stolk
2000-04-04  4:00       ` Alex Rhomberg
2000-04-04  4:00         ` Bram Stolk
2000-04-04  4:00         ` Compaq C/C++ Team
2000-04-07  4:00 ` Abraham Theodorus Stolk
2000-04-09  4:00   ` James Macnicol
2000-04-09  4:00     ` Abraham Theodorus Stolk
2000-04-10  4:00       ` James Macnicol
2000-04-10  4:00         ` Compaq c++ compiler and debian's binutils Bram Stolk
2000-04-10  4:00           ` Goswin Brederlow
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox