simple STL bug

Patrick Connolly Patrick_ConnollyATNetcomSystems.com
Wed Sep 15 10:47:00 GMT 1999


Title: simple STL bug





When I atempt to compile this simple file:


#include <string>
#include <set>
void main (void) {
     set<string> SM;     
     SM.insert("red");
     SM.insert("green");
     SM.insert("blue");
     SM.erase("green");  //Compiler cann't handle this
}  


   ...I get this error message:
> g++ nested.c /usr/ccs/bin/as: "/var/tmp/cc5M1nu0.s", line 2736: error: can't compute value of an expression involving an external symbol

        I understand that this is probably coming from a bug in the Sun assembler,  but is there a workaround for this?  Does this mean that one can't compile a file using a simple STL set of strings on the gnu compiler (assuming that one would want to erase members from the set) ?

Patrick Connolly






More information about the Gcc-bugs mailing list