From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Lawson To: egcs@cygnus.com Subject: 970929 snapshot: a ghost in g++ !-) Date: Fri, 03 Oct 1997 05:54:00 -0000 Message-id: <9710031253.AA07416@drfmc.ceng.cea.fr> X-SW-Source: 1997-10/msg00151.html Hi ! There still is a problem between the order used to include the "string" and "stl"-files. In the following test-program, the apparition takes place in the file. Enjoy, Max P.S. Thanx for the GREAT job >> cat z.cc #include #ifdef __ghost #include #include #else #include #include #endif int main() { string s("a_string"); vector v(3,-1.0); cout << "a string: \"" << s << "\" followed by a vector element: " << v[0] << endl; return 1; } >> g++ -v -D__ghost -g z.cc Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.11/specs gcc version egcs-2.90.11 970929 (gcc2-970802 experimental) /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.11/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -g -Di386 -Di586 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i586__ -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__ghost z.cc /tmp/cca12972.ii GNU CPP version egcs-2.90.11 970929 (gcc2-970802 experimental) (i386 Linux/ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include/g++ /usr/local/include /usr/local/i586-pc-linux-gnulibc1/include /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.11/include /usr/include End of search list. /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.11/cc1plus /tmp/cca12972.ii -quiet -dumpbase z.cc -g -version -o /tmp/cca12972.s GNU C++ version egcs-2.90.11 970929 (gcc2-970802 experimental) (i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.90.11 970929 (gcc2-970802 experimental). In file included from /usr/local/include/g++/std/bastring.h:40, from /usr/local/include/g++/string:6, from z.cc:4: /usr/local/include/g++/stdexcept:41: syntax error before `;' /usr/local/include/g++/stdexcept:43: parse error before `&' /usr/local/include/g++/stdexcept:43: missing ';' before right brace /usr/local/include/g++/stdexcept:44: extraneous `char' ignored /usr/local/include/g++/stdexcept:44: virtual outside class declaration /usr/local/include/g++/stdexcept:44: non-member function `what()' cannot have `const' method qualifier /usr/local/include/g++/stdexcept: In function `const class logic_error * what()': /usr/local/include/g++/stdexcept:44: `_what' undeclared (first use this function) /usr/local/include/g++/stdexcept:44: (Each undeclared identifier is reported only once /usr/local/include/g++/stdexcept:44: for each function it appears in.) /usr/local/include/g++/stdexcept: At top level: /usr/local/include/g++/stdexcept:49: parse error before `&' /usr/local/include/g++/stdexcept:49: missing ';' before right brace /usr/local/include/g++/stdexcept:54: parse error before `&' /usr/local/include/g++/stdexcept:54: missing ';' before right brace /usr/local/include/g++/stdexcept:59: parse error before `&' /usr/local/include/g++/stdexcept:59: missing ';' before right brace /usr/local/include/g++/stdexcept:64: parse error before `&' /usr/local/include/g++/stdexcept:64: missing ';' before right brace /usr/local/include/g++/stdexcept:68: syntax error before `;' /usr/local/include/g++/stdexcept:70: parse error before `&' /usr/local/include/g++/stdexcept:70: missing ';' before right brace /usr/local/include/g++/stdexcept:71: extraneous `char' ignored /usr/local/include/g++/stdexcept:71: virtual outside class declaration /usr/local/include/g++/stdexcept:71: non-member function `what()' cannot have `const' method qualifier /usr/local/include/g++/stdexcept: In function `const class runtime_error * what()': /usr/local/include/g++/stdexcept:71: new declaration `const class runtime_error * what()' /usr/local/include/g++/stdexcept:44: ambiguates old declaration `const class logic_error * what()' /usr/local/include/g++/stdexcept: At top level: /usr/local/include/g++/stdexcept:72: parse error before `protected' /usr/local/include/g++/stdexcept:78: parse error before `&' /usr/local/include/g++/stdexcept:78: missing ';' before right brace /usr/local/include/g++/stdexcept:83: parse error before `&' /usr/local/include/g++/stdexcept:83: missing ';' before right brace /usr/local/include/g++/stdexcept:88: parse error before `&' /usr/local/include/g++/stdexcept:88: missing ';' before right brace