X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Kushal Kumaran" To: Subject: -ansi breaks gpp? Date: Sat, 25 Oct 2003 00:26:05 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Reply-To: djgpp AT delorie DOT com I am unable to use the -ansi switch with the most trivial C++ programs: -- Begin test.cc #include int main() { } -- End test.cc -- Begin compilation transcript (copied and pasted from Emacs) cd c:\foo\cc\ gpp -v -ansi -o test.exe test.cc Reading specs from c:/djgpp/lib/gcc-lib/djgpp/3.32/specs Configured with: /devel/gnu/gcc/3.3/gnu/gcc-3.32/configure i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disable-nls Thread model: single gcc version 3.3.2 c:/djgpp/lib/gcc-lib/djgpp/3.32/cc1plus.exe -quiet -v -D__GNUC__=3 -D_ _GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -remap -imacros c:/djgpp/lib/gcc-lib/djgpp/3.32/djgpp.ver test.cc -D__GNUG__=3 -quiet -dumpbase test.cc -ansi -auxbase test -ansi -version -o c:/djgpp/tmp/cc2dYfBE.s GNU C++ version 3.3.2 (djgpp) compiled by GNU C version 3.3.2. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "c:/djgpp/djgpp/include" #include "..." search starts here: #include <...> search starts here: c:/djgpp/lang/cxx/3.32 c:/djgpp/lang/cxx/3.32/djgpp c:/djgpp/lang/cxx/3.32/backward c:/djgpp/lib/gcc-lib/djgpp/3.32/include c:/djgpp/include End of search list. In file included from test.cc:1: c:/djgpp/lang/cxx/3.32/cmath:107: error: `acosf' not declared c:/djgpp/lang/cxx/3.32/cmath:110: error: `asinf' not declared c:/djgpp/lang/cxx/3.32/cmath:113: error: `atanf' not declared c:/djgpp/lang/cxx/3.32/cmath:116: error: `atan2f' not declared c:/djgpp/lang/cxx/3.32/cmath:119: error: `ceilf' not declared c:/djgpp/lang/cxx/3.32/cmath:122: error: `coshf' not declared c:/djgpp/lang/cxx/3.32/cmath:125: error: `expf' not declared c:/djgpp/lang/cxx/3.32/cmath:128: error: `floorf' not declared c:/djgpp/lang/cxx/3.32/cmath:131: error: `fmodf' not declared c:/djgpp/lang/cxx/3.32/cmath:134: error: `frexpf' not declared c:/djgpp/lang/cxx/3.32/cmath:137: error: `ldexpf' not declared c:/djgpp/lang/cxx/3.32/cmath:140: error: `logf' not declared c:/djgpp/lang/cxx/3.32/cmath:143: error: `log10f' not declared c:/djgpp/lang/cxx/3.32/cmath:146: error: `modff' not declared c:/djgpp/lang/cxx/3.32/cmath:149: error: `powf' not declared c:/djgpp/lang/cxx/3.32/cmath:152: error: `sinhf' not declared c:/djgpp/lang/cxx/3.32/cmath:155: error: `tanf' not declared c:/djgpp/lang/cxx/3.32/cmath:158: error: `tanhf' not declared c:/djgpp/lang/cxx/3.32/cmath: In function `float std::acos(float)': c:/djgpp/lang/cxx/3.32/cmath:184: error: `acosf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::asin(float)': c:/djgpp/lang/cxx/3.32/cmath:204: error: `asinf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::atan(float)': c:/djgpp/lang/cxx/3.32/cmath:222: error: `atanf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::atan2(float, float)': c:/djgpp/lang/cxx/3.32/cmath:240: error: `atan2f' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::ceil(float)': c:/djgpp/lang/cxx/3.32/cmath:260: error: `ceilf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::cosh(float)': c:/djgpp/lang/cxx/3.32/cmath:288: error: `coshf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::exp(float)': c:/djgpp/lang/cxx/3.32/cmath:306: error: `expf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::floor(float)': c:/djgpp/lang/cxx/3.32/cmath:334: error: `floorf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::fmod(float, float)': c:/djgpp/lang/cxx/3.32/cmath:352: error: `fmodf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::frexp(float, int*)': c:/djgpp/lang/cxx/3.32/cmath:372: error: `frexpf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::ldexp(float, int)': c:/djgpp/lang/cxx/3.32/cmath:391: error: `ldexpf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::log(float)': c:/djgpp/lang/cxx/3.32/cmath:411: error: `logf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::log10(float)': c:/djgpp/lang/cxx/3.32/cmath:429: error: `log10f' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::modf(float, float*)': c:/djgpp/lang/cxx/3.32/cmath:447: error: `modff' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `long double std::modf(long double, long double*)': c:/djgpp/lang/cxx/3.32/cmath:461: error: `::modfl' undeclared (first use here) c:/djgpp/lang/cxx/3.32/cmath: In function `float std::pow(float, float)': c:/djgpp/lang/cxx/3.32/cmath:486: error: `powf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::sinh(float)': c:/djgpp/lang/cxx/3.32/cmath:528: error: `sinhf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::tan(float)': c:/djgpp/lang/cxx/3.32/cmath:556: error: `tanf' undeclared in namespace ` __gnu_cxx::__c99_binding' c:/djgpp/lang/cxx/3.32/cmath: In function `float std::tanh(float)': c:/djgpp/lang/cxx/3.32/cmath:574: error: `tanhf' undeclared in namespace ` __gnu_cxx::__c99_binding' Compilation finished at Fri Oct 24 11:02:21 -- End compilation transcript The problem goes away if 1. certain headers are not included(including only string works, iostream doesn't) 2. -ansi switch is not used, or 3. C programs are compiled, with or without -ansi. Am I doing something wrong? Does the -ansi switch simply not work with C++? I couldn't find any references to the -ansi switch at google. Also, in the above messages, there is a complaint about 'nonexistent directory "c:/djgpp/djgpp/include"'. Where does this come from? I removed my djgpp directory and unzipped just djdev203, bnu214, gcc332, gpp332 and tried again, with the same errors. TIA, Kushal.