This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs 1.03a & maps (bug?)


Dear developers,

I can' t explain the behaviour of my simple test program (and hope that I
am just dead stupid and it is not a bug :-)  This is my test program: 
#include <map> #include <string> Markus Klink wissenschaftliche Hilfskraft
Sonderforschungsbereich 504, Universitaet Mannheim #include <iostream>

int main()  {
  
  map<string,string> testmap; 

  testmap["PAUL"]="foo0"; 
  testmap["MARKUS"]="foo1"; 

  cout << testmap["PAUL"]; 
  return 0;  
}

And here comes the answer from gcc (g++ and so on behave exactly the same,
whether I include library switches or not):  

netec:~/Gemini/Redif$ gcc test.cc -o testmap -v Reading specs from
/netec/home/adnetec/egcs/lib/gcc-lib/sparc-sun-solaris2.5/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release) 

/netec/home/adnetec/egcs/lib/gcc-lib/sparc-sun-solaris2.5/egcs-2.90.29/cpp
-lang-c++-v-undef-D__GNUC__=2-D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=90 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__
-D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix
-Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__GCC_NEW_VARARGS__
-Acpu(sparc) -Amachine(sparc) test.cc /var/tmp/cca006EK.ii GNU CPP version
egcs-2.90.29 980515 (egcs-1.0.3 release) (sparc) #include "..." search
starts here:  #include <...> search starts here: 
 /netec/home/adnetec/egcs/include/g++
 /usr/local/include
 /netec/home/adnetec/egcs/sparc-sun-solaris2.5/include

/netec/home/adnetec/egcs/lib/gcc-lib/sparc-sun-solaris2.5/egcs-2.90.29/include
 /usr/include End of search list. 

/netec/home/adnetec/egcs/lib/gcc-lib/sparc-sun-solaris2.5/egcs-2.90.29/cc1plus
/var/tmp/cca006EK.ii-quiet-dumpbase test.cc -version -o
/var/tmp/cca006EK.s GNU C++ version egcs-2.90.29 980515 (egcs-1.0.3
release)  (sparc-sun-solaris2.5) compiled by GNU C version egcs-2.90.29
980515 (egcs-1.0.3 release). 
 /usr/ccs/bin/as -V -Qy -s -o /var/tmp/cca006EK1.o /var/tmp/cca006EK.s
/usr/ccs/bin/as: WorkShop Compilers 4.2 dev 13 May 1996
/usr/ccs/bin/as: "/var/tmp/cca006EK.s", line 1646: error: can't compute
value of an expression involving an external symbol 


Since I already have compiled the complete set of perl and mySQL with the
compiler I think it must have something to do with my small program, or
the fact that this is C++. Unformatunately I could not try to make the
testsuite.

Thanks for your help,
Markus



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]