From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30867 invoked by alias); 12 Feb 2008 23:20:25 -0000 Received: (qmail 30857 invoked by uid 22791); 12 Feb 2008 23:20:24 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.224) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Feb 2008 23:20:07 +0000 Received: by wx-out-0506.google.com with SMTP id s18so5041879wxc.14 for ; Tue, 12 Feb 2008 15:20:05 -0800 (PST) Received: by 10.70.92.5 with SMTP id p5mr1236700wxb.33.1202858405128; Tue, 12 Feb 2008 15:20:05 -0800 (PST) Received: by 10.70.89.18 with HTTP; Tue, 12 Feb 2008 15:20:05 -0800 (PST) Message-ID: <359fcc390802121520j8b7102n8d7ac94f9dd919bb@mail.gmail.com> Date: Tue, 12 Feb 2008 23:20:00 -0000 From: "James Tebneff" To: "David Arthur" Subject: Re: STL problems in GCC 4.1.2 Cc: gcc-help@gcc.gnu.org In-Reply-To: <000401c86dc8$ff7391f0$500010ac@gx520> MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <000301c86dc4$35920a00$500010ac@gx520> <8bc817ee0802121423k6350289nb2512325f3a3a910@mail.gmail.com> <000401c86dc8$ff7391f0$500010ac@gx520> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg00112.txt.bz2 On Feb 13, 2008 9:15 AM, David Arthur wrote: > Well, here goes. I'll snip a chunk out of the middle to shorten the post! > > c++ -I/home/dart/src/dartnms/include -I/home/dart/src/plugappsdk/include = -I/home/dart/src/dartnms/plugins/dartnmsbase/include -I/home/dart/src/lib -= D_LINUX_ -Wno-deprecated -c -fpermissive -o /home/dart/src/dartnms/obj/main= .o /home/dart/src/dartnms/src/main.cpp > /usr/include/c++/4.1.2/bits/stl_tree.h:330: error: expected identifier be= fore =E2=80=98}=E2=80=99 token > /usr/include/c++/4.1.2/bits/stl_tree.h:330: error: expected unqualified-i= d before =E2=80=98}=E2=80=99 token > /usr/include/c++/4.1.2/bits/stl_tree.h:330: error: expected unqualified-i= d before =E2=80=98else=E2=80=99 > /usr/include/c++/4.1.2/bits/stl_tree.h:791: error: no =E2=80=98std::_Rb_t= ree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& std::_Rb_tree<_Key, _Val, _= KeyOfValue, _Compare, _Alloc>::operator=3D(const std::_Rb_tree<_Key, _Val, = _KeyOfValue, _Compare, _Alloc>&)=E2=80=99 member function declared in class= =E2=80=98std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>=E2=80=99 > /usr/include/c++/4.1.2/bits/stl_tree.h:791: error: template definition of= non-template =E2=80=98std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Al= loc>& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::operator=3D= (const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)=E2=80=99 > /usr/include/c++/4.1.2/bits/stl_tree.h: In member function =E2=80=98std::= _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& std::_Rb_tree<_Key, _V= al, _KeyOfValue, _Compare, _Alloc>::operator=3D(const std::_Rb_tree<_Key, _= Val, _KeyOfValue, _Compare, _Alloc>&)=E2=80=99: > /usr/include/c++/4.1.2/bits/stl_tree.h:797: error: =E2=80=98_M_impl=E2=80= =99 was not declared in this scope > /usr/include/c++/4.1.2/bits/stl_tree.h: At global scope: > /usr/include/c++/4.1.2/bits/stl_tree.h:813: error: =E2=80=98typename std:= :_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tre= e<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert=E2=80=99 is not a s= tatic member of =E2=80=98class std::_Rb_tree<_Key, _Val, _KeyOfValue, _Comp= are, _Alloc>=E2=80=99 > /usr/include/c++/4.1.2/bits/stl_tree.h:813: error: template definition of= non-template =E2=80=98typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Com= pare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _A= lloc>::_M_insert=E2=80=99 > > [...snip...] > > /usr/include/c++/4.1.2/bits/stl_tree.h:1485: error: =E2=80=98__x=E2=80=99= was not declared in this scope > /usr/include/c++/4.1.2/bits/stl_map.h: At global scope: > /usr/include/c++/4.1.2/bits/stl_map.h:127: error: expected identifier bef= ore =E2=80=98}=E2=80=99 token > /usr/include/c++/4.1.2/bits/stl_map.h:127: error: expected unqualified-id= before =E2=80=98}=E2=80=99 token > /usr/include/c++/4.1.2/bits/stl_map.h:127: error: expected unqualified-id= before =E2=80=98else=E2=80=99 > /usr/include/c++/4.1.2/bits/stl_multimap.h:142: error: expected identifie= r before =E2=80=98}=E2=80=99 token > /usr/include/c++/4.1.2/bits/stl_multimap.h:142: error: expected unqualifi= ed-id before =E2=80=98}=E2=80=99 token > /usr/include/c++/4.1.2/bits/stl_multimap.h:142: error: expected unqualifi= ed-id before =E2=80=98else=E2=80=99 > make: *** [/home/dart/src/dartnms/obj/main.o] Error 1 > > Thanks, Dave > > > -----Original Message----- > From: Tom Browder [mailto:tom.browder@gmail.com] > Sent: Tuesday, February 12, 2008 4:23 PM > To: David Arthur > Cc: gcc-help@gcc.gnu.org > Subject: Re: STL problems in GCC 4.1.2 > > On 2/12/08, David Arthur wrote: > ... > > I am trying to compile an app under gcc 4.1.2 and I get _loads_ of STL > > errors, relating to templates in STL headers that are unhappy. The stra= nge > > thing is that all compiles beautifully under gcc 3.3.3! I have found th= at > > Lots of changes, and tightening of user code required, from 3.3.3 to 4.1.= 2. > > How about posting a couple of the error messages so we can see what > kinds of errors you're talking about. > > -Tom > > Like Tom said you need to explicitly include header files for all STL constructs you use and indeed for any function you use from any header file. Gcc 4.x.x has made these rules very strict. You are compiling with -Wall and -Werror right? I would worry about using -fpermissive can you remove this option and fix any problems that may arise? Regards, JT