stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject [ boost-Bugs-1693865 ] undeclared memcpy() in flex_string.hpp
Date Thu, 05 Apr 2007 13:17:18 GMT
Bugs item #1693865, was opened at 2007-04-03 14:48 Message generated for
change (Comment added) made by hkaiser You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1693865&gro
up_id=7586

Please note that this message will contain a full copy of the comment
thread, including the initial issue submission, for this request, not
just the latest update.
Category: wave
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Farid (farid_zaripov)
Assigned to: Hartmut Kaiser (hkaiser)
Summary: undeclared memcpy() in flex_string.hpp

Initial Comment:
I have been working on the Apache C++ Standard Library project (STDCXX):
http://incubator.apache.org/stdcxx/

I've trying to compile the boost library with stdcxx.

The details can be found here:
http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200704.mbo
x/%
3c7BDB2168BEAEF14C98F1901FD2DE64386573EB@epmsa009.minsk.epam.com%3e

Boost version: 1.33.1
STDCXX version: 4.2

I've got the error in boost/wave/util/flex_string.hpp:

D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(126) : error
C3861: 'memcpy': identifier not found
        D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(654) : see
reference to function template instantiation 'Pod
*boost::wave::util::flex_string_details::pod_copy<char>(const Pod
*,const Pod *,Pod *)' being compiled
        with
        [
            Pod=char
        ]
        D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(643) :
while compiling class template member function 'void
boost::wave::util::AllocatorStringStorage<E>::reserve(unsigned int)'
        with
        [
            E=char
        ]
        D:\_Libs\boost_1_33_1\boost/wave/util/flex_string.hpp(1154) :
see reference to class template instantiation
'boost::wave::util::AllocatorStringStorage<E>' being compiled
        with
        [
            E=char
        ]

    CALL "D:\Program Files\Microsoft Visual Studio
8\Common7\Tools\..\..\VC\bin\vcvars32.BAT" >nul 
    "D:\Program Files\Microsoft Visual Studio
8\Common7\Tools\..\..\VC\bin\cl"  /Zm800 -nologo /EHsc -c  -D_RWSTDDEBUG
/Z7 /Od /Ob0 /EHsc /GR /MTd  /Zc:forScope /Zc:wchar_t
-I"bin\boost\libs\wave\build" -I"D:\_Libs\boost_1_33_1"
-I"D:\_Projects\stdcxx_working\include"
-I"D:\_Projects\stdcxx_working\include\ansi"
-I"D:\_Projects\stdcxx_working\build\msvc-8.0\15s\include"
-I"D:\_Libs\boost_1_33_1"
-Fo"bin\boost\libs\wave\build\libboost_wave.lib\vc-8_0-stdcxx\debug\runt
ime-link-static\threading-multi\instantiate_cpp_exprgrammar.obj"
-Tp"D:\_Libs\boost_1_33_1\libs\wave\build\../src/instantiate_cpp_exprgra
mmar.cpp" 



I propose to #include <string.h> in flex_string.hpp file to declare
memcpy().


----------------------------------------------------------------------

>Comment By: Hartmut Kaiser (hkaiser)
Date: 2007-04-05 08:07

Message:
Logged In: YES
user_id=353975
Originator: NO

Fixed in Boost CVS::HEAD.

Thanks for reporting!
Regards Hartmut

----------------------------------------------------------------------

Comment By: Hartmut Kaiser (hkaiser)
Date: 2007-04-05 08:07

Message:
Logged In: YES
user_id=353975
Originator: NO

Thank you for submitting a bug report to BOOST

----------------------------------------------------------------------

Comment By: Farid (farid_zaripov)
Date: 2007-04-04 08:28

Message:
Logged In: YES
user_id=1760091
Originator: YES

In addition I have compiled boost with stdcxx on gcc 3.4.4 / Cygwin and
got the following errors:

---------------------------------
In file included from
/cygdrive/d/_libs/boost_1_33_1/boost/wave/wave_config.hpp:163,
                 from
/cygdrive/d/_libs/boost_1_33_1/libs/wave/build/../src/instantiate_cpp_ex
prgrammar.cpp:10:
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp: In
member function `T* boost::wave::util::mallocator<T>::allocate(size_t,
const
T*)':
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:195:
error:
there are no arguments to `malloc' that depend on a template parameter,
so a declaration of `malloc' must be available
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:195:
error:
(if you use `-fpermissive', G++ will accept your code, but allowing the
use of an undeclared name is deprecated)
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:196:
error:
there are no arguments to `bad_alloc' that depend on a template
parameter, so a declaration of `bad_alloc' must be available
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp: In
member function `void boost::wave::util::SimpleStringStorage<E,
A>::Init(typename A::size_type, typename A::size_type)':
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:311:
error:
`bad_alloc' is not a member of `std'
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp: In
member function `void boost::wave::util::SimpleStringStorage<E,
A>::reserve(typename A::size_type)':
/cygdrive/d/_libs/boost_1_33_1/boost/wave/util/flex_string.hpp:410:
error:
`bad_alloc' is not a member of `std'

    
    "gcc"   -c -Wall -ftemplate-depth-255  -D_RWSTDDEBUG  -g -O0
-fno-inline -mthreads
-I"/cygdrive/d/_libs/boost_1_33_1/cygwin_bin/bin/boost/libs/wave/build"
-I"/cygdrive/d/_libs/boost_1_33_1"  -I
"/cygdrive/d/_projects/stdcxx_working/include" -I
"/cygdrive/d/_projects/stdcxx_working/include/ansi" -I
"/cygdrive/d/_projects/stdcxx_working/cygwin/15s/include"  -I
"/cygdrive/d/_libs/boost_1_33_1"  -o
"/cygdrive/d/_libs/boost_1_33_1/cygwin_bin/bin/boost/libs/wave/build/lib
boost_wave.a/gcc-stdcxx/debug/runtime-link-static/threading-multi/instan
tiate_cpp_exprgrammar.o"
 
"/cygdrive/d/_libs/boost_1_33_1/libs/wave/build/../src/instantiate_cpp_e
xprgrammar.cpp"

---------------------------------

I propose to #include <cstdlib> to declare malloc() and #include <new>
to declare bad_alloc.

----------------------------------------------------------------------

Comment By: Hartmut Kaiser (hkaiser)
Date: 2007-04-03 16:32

Message:
Logged In: YES
user_id=353975
Originator: NO

Fixed in Boost CVS::HEAD.

----------------------------------------------------------------------

Comment By: Hartmut Kaiser (hkaiser)
Date: 2007-04-03 16:32

Message:
Logged In: YES
user_id=353975
Originator: NO

Thank you for submitting a bug report to BOOST

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1693865&gro
up_id=7586

Mime
View raw message