In the latest gcc 3.3 snapshot (20031201) there is a typo in the concept checking code for the c++ stdlib function generate_n, in: {gccroot}/libstdc++-v3/include/bits/stl_algo.h It looks like the phrase "__typeof__(gen())" was intented to be "__typeof__(__gen())". This problem is already fixed in the latest mainline snapshot (20031203). Here is the context: """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" $ diff -c stl_algo.h stl_algo_fix.h *** stl_algo.h Tue Sep 30 07:37:40 2003 --- stl_algo_fix.h Wed Dec 3 16:55:36 2003 *************** *** 948,954 **** // concept requirements __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, // "the type returned by a _Generator" ! __typeof__(gen())>) for ( ; __n > 0; --__n, ++__first) *__first = __gen(); --- 948,954 ---- // concept requirements __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter, // "the type returned by a _Generator" ! __typeof__(__gen())>) for ( ; __n > 0; --__n, ++__first) *__first = __gen(); """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This was fixed by on the mainline by: * config/locale/generic/c_locale.h: Include <cstdlib> and <cstring>. * include/bits/boost_concept_check.h: Add this-> to unqualified method calls. * include/bits/deque.tcc: Likewise. * include/bits/locale_facets.h : Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/stdio_filebuf.h: Likewise.
Subject: Bug 13290 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: bkoz@gcc.gnu.org 2003-12-04 18:45:43 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/include/bits: stl_algo.h Log message: 2003-12-04 Christopher Saunders <ctsa@u.washington.edu> PR libstdc++/13290 * include/bits/stl_algo.h (generate_n): Fix typo. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1464.2.157&r2=1.1464.2.158 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/stl_algo.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.27.20.1&r2=1.27.20.2
Fix was checked in thanks.