Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <19990518160932.6510.rocketmail@web807.mail.yahoo.com> Date: Tue, 18 May 1999 09:09:32 -0700 (PDT) From: Rick Rankin Subject: Re: bug in egcs-1.1.2? To: "Suhaib M. Siddiqi" , mike DOT fabian AT it-mannesmann DOT de, cygwin AT sourceware DOT cygnus DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii No, they shouldn't. The standard header files no longer end in .h, although some compilers are providing equivalent .h files for backward compatibility. With gcc, for example, there is a , but no . Rick --- "Suhaib M. Siddiqi" wrote: > > Should these > > #include > #include > #include > #include > #include > > > NOT be > > #include > #include > #include > #include > #include > > or whatever???? > > > ----- Original Message ----- > From: Mike Fabian > To: > Sent: Tuesday, May 18, 1999 11:20 AM > Subject: bug in egcs-1.1.2? > > > > Hello, > > > > I encountered a problem while using Mumit Khan's egcs-1.1.2 release. > > > > (~$ g++ --version > > egcs-2.91.66 ) > > > > the following small test program doesn't compile with egcs-1.1.2 > > > > ---------------------------------------------------------------------- > > #include > > #include > > #include > > #include > > #include > > > > class PairsOfStrings : public std::deque > > > > { > > }; > > > > void main(int argc, char* argv[]) > > { > > PairsOfStrings d; > > std::string s1("field1"),s2("value1"),s3("field2"),s4("value2"); > > d.push_back(std::make_pair(s1,s2)); > > d.push_back(std::make_pair(s3,s4)); > > > > std::string str = ""; > > for(PairsOfStrings::const_iterator p=d.begin();p!=d.end();p++) { > > // the following line doesn't compile with egcs: > > str += p->first + p->second; > > } > > std::cout << str << std::endl; > > } > > ---------------------------------------------------------------------- > > The error message is: > > > > test.cpp: In function `int main(...)': > > test.cpp:21: result of `operator->()' yields non-pointer result > > test.cpp:21: result of `operator->()' yields non-pointer result > > > > When `list' is used instead of `deque', the program compiles fine > > and works as expected. > > > > With Microsoft's VC 5.0 the program compiles without errors > > for `deque' as well (and the program runs correctly). > > > > Is this possibly a bug in egcs?? > > > > > > Mike > > > > PS: > > here is the complete output of the compiler: > > ---------------------------------------------------------------------- > > cd d:/home/fabian/cpp/ > > g++ test.cpp -o test.exe > > > C:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../../include/g++/stl_deque.h: > In method `const struct > pair,__default_alloc_template > >,basic_string,__default_alloc_template > > > & > __deque_iterator,__default_alloc_template > >,basic_string,__default_alloc_template > > >,const > pair,__default_alloc_template > >,basic_string,__default_alloc_template > > > &,const > pair,__default_alloc_template > >,basic_string,__default_alloc_template > > > &,0>::operator > ->,__default_alloc_template > >,basic_string,__default_alloc_template > > >, const > pair,__default_alloc_template > >,basic_string,__default_alloc_template > > > &, const > pair,__default_alloc_template > >,basic_string,__default_alloc_template > > > &, 0>() const': > > test.cpp:21: instantiated from here > > > C:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../../include/g++/stl_deque.h:132: > conversion from `const > pair,__default_alloc_template > >,basic_string,__default_alloc_template > > > *' to non-scalar type > `pair,__default_alloc_template > >,basic_string,__default_alloc_template > > >' requested > > test.cpp: In function `int main(...)': > > test.cpp:21: result of `operator->()' yields non-pointer result > > test.cpp:21: result of `operator->()' yields non-pointer result > > > > Compilation exited abnormally with code 1 at Tue May 18 15:41:19 > > ---------------------------------------------------------------------- > > > > > > -- > > Want to unsubscribe from this list? > > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > > > > > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > _____________________________________________________________ Do You Yahoo!? Free instant messaging and more at http://messenger.yahoo.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com