This is the mail archive of the gcc-help@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]
Other format: [Raw text]

explicit keyword in stl_iterator.h


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In /usr/include/g++-v3/bits/stl_iterator.h, I get syntax errors that because 
of the explicit keyword.  It seems the gcc doesn't recognize the keyword, 
then fails.  When I removed the explicit keyword from line 116 just to test 
it, it again failed on line 339, the place of the next explicit keyword.  
What is going on? Please CC me as I am not subscribed to this list.

Linux version: Linux From Scratch (20020306)
Kernel version: 2.4.18
Gcc version: Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/specs
Configured with: ../gcc-3.1.0/configure --prefix=/usr --enable-shared 
- --enable-languages=c,c++ --with-cpu=athlon --enable-threads=posix 
- --disable-nls
Thread model: posix
gcc version 3.1.1 20020519 (prerelease) [from CVS 3.1-branch]
C(XX)FLAGS: -O3 -fomit-frame-pointer -march=athlon-tbird -mmmx -m3dnow -pipe 
[errors still occur with no flags]
Trying to compile KDE CVS: 20020520 HEAD
Other Versions of gcc installed: none

Error messages:
root@Blackfoot:/usr/src/k/kdebase/kdm/kfrontend# make
Making all in pics
make[1]: Entering directory `/usr/src/k/kdebase/kdm/kfrontend/pics'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/k/kdebase/kdm/kfrontend/pics'
make[1]: Entering directory `/usr/src/k/kdebase/kdm/kfrontend'
source='kdm_greet.all_cpp.cpp' object='kdm_greet.all_cpp.o' libtool=no \
depfile='.deps/kdm_greet.all_cpp.Po' tmpdepfile='.deps/kdm_greet.all_cpp.TPo' 
\
depmode=gcc3 /bin/sh ../../admin/depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I./../backend -I/usr/local/kde/include 
- -I/usr/local/qt/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  
- -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef 
- -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi 
- -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG 
- -DNO_DEBUG -O2 -O3 -fomit-frame-pointer -march=athlon-tbird -mmmx -m3dnow 
- -pipe -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT 
- -DQT_NO_ASCII_CAST -D_GNU_SOURCE  -c -o kdm_greet.all_cpp.o `test -f 
kdm_greet.all_cpp.cpp || echo './'`kdm_greet.all_cpp.cpp
In file included from /usr/include/g++-v3/bits/stl_algobase.h:75,
                 from /usr/include/g++-v3/memory:54,
                 from /usr/include/g++-v3/string:48,
                 from /usr/include/g++-v3/bits/localefwd.h:49,
                 from /usr/include/g++-v3/ios:48,
                 from /usr/include/g++-v3/ostream:45,
                 from /usr/include/g++-v3/iostream:45,
                 from liloinfo.cpp:27,
                 from kdm_greet.all_cpp.cpp:7:
/usr/include/g++-v3/bits/stl_iterator.h:117: syntax error before `(' token
/usr/include/g++-v3/bits/stl_iterator.h:117: missing ';' before right brace
/usr/include/g++-v3/bits/stl_iterator.h:122: parse error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:123: semicolon missing after
   declaration of `class std::reverse_iterator<_Iterator>'
/usr/include/g++-v3/bits/stl_iterator.h:123: declaration of template `
   template<class _Iterator> int std::reverse_iterator(...)'
/usr/include/g++-v3/bits/stl_iterator.h:91: conflicts with previous 
declaration
   `template<class _Iterator> class std::reverse_iterator'
/usr/include/g++-v3/bits/stl_iterator.h:91: previous non-function declaration 
`
   template<class _Iterator> class std::reverse_iterator'
/usr/include/g++-v3/bits/stl_iterator.h:123: conflicts with function
   declaration `template<class _Iterator> int std::reverse_iterator(...)'
/usr/include/g++-v3/bits/stl_iterator.h: In function `int
   std::reverse_iterator(...)':
/usr/include/g++-v3/bits/stl_iterator.h:123: only constructors take base
   initializers
/usr/include/g++-v3/bits/stl_iterator.h: At global scope:
/usr/include/g++-v3/bits/stl_iterator.h:130: non-template type `
   reverse_iterator' used as a template
/usr/include/g++-v3/bits/stl_iterator.h:131: declaration of template `
   template<class _Iter> int std::reverse_iterator(const int&)'
/usr/include/g++-v3/bits/stl_iterator.h:91: conflicts with previous 
declaration
   `template<class _Iterator> class std::reverse_iterator<_Iterator>'
/usr/include/g++-v3/bits/stl_iterator.h:91: previous non-function declaration 
`
   template<class _Iterator> class std::reverse_iterator<_Iterator>'
/usr/include/g++-v3/bits/stl_iterator.h:131: conflicts with function
   declaration `template<class _Iter> int std::reverse_iterator(const int&)'
/usr/include/g++-v3/bits/stl_iterator.h: In function `int
   std::reverse_iterator(const int&)':
/usr/include/g++-v3/bits/stl_iterator.h:131: only constructors take base
   initializers
/usr/include/g++-v3/bits/stl_iterator.h: At global scope:
/usr/include/g++-v3/bits/stl_iterator.h:137: parse error before `)' token
/usr/include/g++-v3/bits/stl_iterator.h:145: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:157: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:164: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:177: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:189: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:201: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:214: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:222: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:235: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:243: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:256: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:271: parse error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:273: `bool operator==(...)' must have
   an argument of class or enumerated type
/usr/include/g++-v3/bits/stl_iterator.h:273: `bool operator==(...)' must take
   exactly two arguments
/usr/include/g++-v3/bits/stl_iterator.h:277: parse error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:279: `bool operator<(...)' must have 
an
   argument of class or enumerated type
/usr/include/g++-v3/bits/stl_iterator.h:279: `bool operator<(...)' must take
   exactly two arguments
/usr/include/g++-v3/bits/stl_iterator.h:283: parse error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:285: `bool operator!=(...)' must have
   an argument of class or enumerated type
/usr/include/g++-v3/bits/stl_iterator.h:285: `bool operator!=(...)' must take
   exactly two arguments
/usr/include/g++-v3/bits/stl_iterator.h:289: parse error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:291: `bool operator>(...)' must have 
an
   argument of class or enumerated type
/usr/include/g++-v3/bits/stl_iterator.h:291: `bool operator>(...)' must take
   exactly two arguments
/usr/include/g++-v3/bits/stl_iterator.h:295: parse error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:297: `bool operator<=(...)' must have
   an argument of class or enumerated type
/usr/include/g++-v3/bits/stl_iterator.h:297: `bool operator<=(...)' must take
   exactly two arguments
/usr/include/g++-v3/bits/stl_iterator.h:301: parse error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:303: `bool operator>=(...)' must have
   an argument of class or enumerated type
/usr/include/g++-v3/bits/stl_iterator.h:303: `bool operator>=(...)' must take
   exactly two arguments
/usr/include/g++-v3/bits/stl_iterator.h:306: parse error before `<' token
/usr/include/g++-v3/bits/stl_iterator.h:313: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:313: parse error before `<' token
/usr/include/g++-v3/bits/stl_iterator.h:315: `int operator+(...)' must have an
   argument of class or enumerated type
/usr/include/g++-v3/bits/stl_iterator.h:315: `int operator+(...)' must take
   either one or two arguments
/usr/include/g++-v3/bits/stl_iterator.h: In function `int operator+(...)':
/usr/include/g++-v3/bits/stl_iterator.h:315: `reverse_iterator' undeclared
   (first use this function)
/usr/include/g++-v3/bits/stl_iterator.h:315: (Each undeclared identifier is
   reported only once for each function it appears in.)
/usr/include/g++-v3/bits/stl_iterator.h:315: `_Iterator' undeclared (first use
   this function)
/usr/include/g++-v3/bits/stl_iterator.h:315: `__x' undeclared (first use this
   function)
/usr/include/g++-v3/bits/stl_iterator.h:315: `__n' undeclared (first use this
   function)
/usr/include/g++-v3/bits/stl_iterator.h: At global scope:
/usr/include/g++-v3/bits/stl_iterator.h:329: parse error before `<' token
/usr/include/g++-v3/bits/stl_iterator.h:340: syntax error before `(' token
/usr/include/g++-v3/bits/stl_iterator.h:353: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:361: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:365: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:370: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:399: parse error before `<' token
/usr/include/g++-v3/bits/stl_iterator.h:409: syntax error before `(' token
/usr/include/g++-v3/bits/stl_iterator.h:422: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:430: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:434: syntax error before `&' token
/usr/include/g++-v3/bits/stl_iterator.h:439: syntax error before `operator'
/usr/include/g++-v3/bits/stl_iterator.h:472: parse error before `<' token
/usr/include/g++-v3/bits/stl_iterator.h:476: `_Container' is not a class or
   namespace
/usr/include/g++-v3/bits/stl_iterator.h:476: `iterator' is not a class or
   namespace
/usr/include/g++-v3/bits/stl_iterator.h:476: `_Container' fails to be a 
typedef
   or built in type
/usr/include/g++-v3/bits/stl_iterator.h:478: parse error before `public'
/usr/include/g++-v3/bits/stl_iterator.h:486: `_Container' was not declared in
   this scope
/usr/include/g++-v3/bits/stl_iterator.h:486: `_Container' is not a class or
   namespace
/usr/include/g++-v3/bits/stl_iterator.h:486: `iterator' is not a class or
   namespace
/usr/include/g++-v3/bits/stl_iterator.h:486: parse error before `)' token
/usr/include/g++-v3/bits/stl_iterator.h: In function `int
   insert_iterator(...)':
/usr/include/g++-v3/bits/stl_iterator.h:487: `int insert_iterator(...)'
   redeclared as different kind of symbol
/usr/include/g++-v3/bits/stl_iterator.h:472: previous declaration of `
   template<class _Container> class insert_iterator'
/usr/include/g++-v3/bits/stl_iterator.h:472: previous non-function declaration
   `template<class _Container> class insert_iterator'
/usr/include/g++-v3/bits/stl_iterator.h:487: conflicts with function
   declaration `int insert_iterator(...)'
/usr/include/g++-v3/bits/stl_iterator.h:487: `__i' undeclared (first use this
   function)
/usr/include/g++-v3/bits/stl_iterator.h:487: only constructors take base
   initializers
/usr/include/g++-v3/bits/stl_iterator.h:487: confused by earlier errors, 
bailing out
make[1]: *** [kdm_greet.all_cpp.o] Error 1
make[1]: Leaving directory `/usr/src/k/kdebase/kdm/kfrontend'
make: *** [all-recursive] Error 1

Thanks for any help, and thanks for CCing me.
- -- 
Jim Blomo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE86Wx0UlS7JsvyVRIRAqRSAKDypuYvDnSJqwaufaWqKc3oLMb5IQCgwSu3
5/0abFx3K/RCQ6yykbfyDls=
=6w41
-----END PGP SIGNATURE-----


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