Mail Archives: djgpp/2001/09/11/04:05:21
On Tue, 11 Sep 2001, Alex Vinokur wrote:
> 1. Why do _both 'gcc -v' and 'gpp -v'_ produce the same output?
No, they don't. "gcc -v" says:
d:/sys/djgpp/lib/gcc-lib/djgpp/2.953/cpp0.exe -lang-c -v -D__GNUC__=2
while "gpp -v" says:
d:/sys/djgpp/lib/gcc-lib/djgpp/2.953/cpp0.exe -lang-c++ -v -D__GNUC__=2
See that "-lang-c++" in gpp's output? That's the difference.
In other words, gpp by default assumes it is a compiling a C++
program, while gcc assumes it's a C program.
> 2. What is GNU CPP version ... ? (C compiler?)
It's the preprocessor.
> 3. 'gpp -v a.c' produces _C++ compiler_ version as well.
> Why doesn't 'gpp -v' do the same thing?
The line
GNU C++ version 2.95.3 20010315/djgpp (release) (djgpp) compiled by GNU
C version 2.95.3 20010315/djgpp (release).
comes from the program cc1plus.exe invoked by gpp (that's one of the
lines you snipped). cc1plus is the C++ compiler. When you type just
"gpp -v", the compiler is not invoked at all, since there's nothing to
compile. So cc1plus doesn't run and doesn't print anything.
> 4. Is there any option that produces _C++ compiler_ version ? :
> %gpp <?-option>
> GNU C++ version 2.95.3 20010315/djgpp (release) (djgpp) compiled by
> GNU C version 2.95.3 20010315/djgpp (release).
Try this:
d:\sys\djgpp\lib\gcc-lib\djgpp\2.953\cc1plus -version < nul > nul
- Raw text -