| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
| From: | "Alex Vinokur" <alexvn AT bigfoot DOT com> |
| Newsgroups: | comp.os.msdos.djgpp,comp.lang.c++ |
| Subject: | Different results of compilation with gpp 2.95.3 and 3.0.4 |
| Date: | Thu, 21 Mar 2002 13:31:28 +0200 |
| Organization: | Scopus |
| Lines: | 102 |
| Message-ID: | <a7cg8d$k6fmh$1@ID-79865.news.dfncis.de> |
| NNTP-Posting-Host: | gateway.scopus.net (62.90.123.5) |
| X-Trace: | fu-berlin.de 1016710221 21184209 62.90.123.5 (16 [79865]) |
| X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Here is some code.
It had no problem with gpp -> GNU C++ version 2.95.3 20010315/djgpp .
What has been changed in gpp -> GNU C++ version 3.0.4 (djgpp) ?
Does it mean that gpp version 2.95.3 is inconsistent with C++ Standard?
Thanks.
===============================================================
Windows-2000
gpp : GNU C++ version 3.0.4 (djgpp)
%gpp -v
Reading specs from c:/djgpp/lib/gcc-lib/djgpp/3.04/specs
Configured with: ../configure
i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disable-nls
Thread model: single
gcc version 3.0.4
===============================================================
|======= C++-code : BEGIN ========
#include <iostream>
#include <string>
#include <sstream>
template <typename T>
string to_string (const T& val_i)
{
ostringstream osstr;
osstr << val_i;
return osstr.str();
}
int main()
{
cout << to_string (123) << endl;
return 0;
}
|======= C++-code : END ==========
|====== Compilation : BEGIN ======
%gpp -v main.c
Reading specs from c:/djgpp/lib/gcc-lib/djgpp/3.04/specs
Configured with: ../configure
i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disable-nls
Thread model: single
gcc version 3.0.4
c:/djgpp/lib/gcc-lib/djgpp/3.04/cc1plus.exe -remap -imacros
c:/djgpp/lib/gcc-lib/djgpp/3.04/djgpp.ver -v -D__GNUC__=3 -D__GNUC_MINOR__=0
-D__GNUC_PATCHLEVEL__=4 -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__unix__ -D_
_MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__unix__ -Asystem=msdos -Asystem=unix -D
__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386
-D__i386__ -D__tune_i586__ -D__tune_pentium__ -DMSDOS -DGO32 -DDJGPP=2 -Duni
x
MAIN.C -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=10
0 -quiet -dumpbase MAIN.C -version -o c:/djgpp/tmp\cce6WKb6.s
GNU CPP version 3.0.4 (cpplib) (80386, BSD syntax)
GNU C++ version 3.0.4 (djgpp)
compiled by GNU C version 3.0.4.
ignoring nonexistent directory "c:/djgpp/djgpp/include"
#include "..." search starts here:
#include <...> search starts here:
c:/djgpp/lang/cxx-v3
c:/djgpp/lang/cxx-v3/djgpp
c:/djgpp/lang/cxx-v3/backward
c:/djgpp/lib/gcc-lib/djgpp/3.04/include
c:/djgpp/include
End of search list.
MAIN.C:6: syntax error before `(' token
MAIN.C:6: parse error before `&' token
MAIN.C:7: ISO C++ forbids declaration of `to_string' with no type
MAIN.C: In function `int to_string(...)':
MAIN.C:8: `ostringstream' undeclared (first use this function)
MAIN.C:8: (Each undeclared identifier is reported only once for each
function
it appears in.)
MAIN.C:8: parse error before `;' token
MAIN.C:9: `osstr' undeclared (first use this function)
MAIN.C:9: `val_i' undeclared (first use this function)
MAIN.C: In function `int main()':
MAIN.C:15: `cout' undeclared (first use this function)
MAIN.C:15: `endl' undeclared (first use this function)
|====== Compilation : END ========
--
====================
Alex Vinokur
http://up.to/alexvn
http://go.to/alexv_math
mailto:alexvn AT bigfoot DOT com
mailto:alexvn AT go DOT to
====================
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |