This is the mail archive of the gcc-bugs@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]

Internal compiler error


Hi hackers, 

I hit an internal compiler error in a rather large program, but
fortunately managed to strip down to the exact problem which seems to be
in instantiating const iterator structs for a map.  I'm running
2.95.2 under linux/i386.  Not sure which version of stl it is, but I can
find out if you need it.

Have fun!

Try compiling the following with g++ -c -Wall foo.cpp :

---BEGIN---

#include <map>
#include <string>

const map<string, string> mymap;

void foo(const string& bar) {
   const struct map<string, string>::iterator itor =
     mymap.find(bar);
}  

---END---

-- 
Giles Constant <gilesc@ftech.net> -  Network Operations
Frontier Internet Services Limited   http://www.frontier-internet.ltd.uk/
Tel: +44 (0)20 7510 4700             Fax: +44 (0)20 7531 9930
All statements made are subject to Frontier's Terms and Conditions of
Business which are available upon request.


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